Solved

Downloading a large file using Struts2

Posted on 2008-10-10
2
1,691 Views
Last Modified: 2013-12-18
I'm trying to download data from an Oracle 10g DB using struts2. I create a temp file from the db and download the temp file.

As the temp file is being created on the server, after a few minutes the browser goes blank (closing the connection, I presume). So when the server tries to pass back the created temp file to the browser, it throws a

java.net.SocketException: Broken pipe

exception. I use iBatis, Oracle 10g and JBoss.

How can I prevent the browser from going blank, when the file is still being created on the server.

Thanks.
Ganesh.
0
Comment
Question by:gunacesun
2 Comments
 
LVL 7

Accepted Solution

by:
humanonomics earned 500 total points
ID: 22703417
Use multi-threading, spawn a new thread to fetch data from the database, this will allow the user to browse the website and use other functionality, while your work is being done by other thread.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Get the parent node - XMLTYPE 9 56
Windows 10 IE Certificate Issue 10 41
Oracle 10g standard edition server with 4 processors 3 24
arguments to jar 5 10
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now