Solved

Downloading a large file using Struts2

Posted on 2008-10-10
2
1,682 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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
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 explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

771 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

10 Experts available now in Live!

Get 1:1 Help Now