Solved

Downloading a large file using Struts2

Posted on 2008-10-10
2
1,699 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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.
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
The viewer will learn how to implement Singleton Design Pattern in Java.

770 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