Solved

Downloading a large file using Struts2

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

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…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

860 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