You could also look into using Ajax (XMLHttpRequest) to handle asynchronous download requests and avoid the visible browser refresh.
Sanjiv On Apr 8, 2005 1:18 PM, Thompson, Marshall <[EMAIL PROTECTED]> wrote: > This is not a POI issue per se, but it is an issue that I would expect some > web POI users to have encountered and to encounter in the future. I > resolved by having a page that refreshes with a status, and gives a way to > retrieve the excel spreadsheet when done. This link: > http://itext.sourceforge.net/tutorial/general/webapp/index.html#timeout > Describes how to do this with a pdf, but I am applying the same logic for a > spreadsheet. If anyone is interested, I'll post my code once I get it > production ready. > > > -----Original Message----- > From: Sharma, Siddharth [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 07, 2005 10:59 AM > To: POI Users List > Subject: RE: Timeout? > > After you set the response headers (such as cookies or mime type), you may > have to explicitly flush the output stream. Your page buffer size default > (8K I believe in most cases) may be larger for auto flush to work in your > case. > > If it's your infrastructure (web server/proxy server/servlet > container/router...) timeout setting (most likely) that is causing the HTTP > connection to timeout after 1 minute, and you cannot change that setting, > you may implement a 'progress bar' page to solve this. > This is the kind that states on the web page something like > "We're workin' baby!!". > And when the real response is ready, it is flushed down the pipe. > I am sure you can scrape a zillion and one implementations from the web to > get this to work. > Or you can always implement the email delivery solution that you spoke of. > > Needless to add, this is not a POI issue. You are probably better of > discussing this in an HTTP or similar forum. > > -----Original Message----- > From: Thompson, Marshall [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 07, 2005 10:30 AM > To: 'POI Users List' > Subject: RE: Timeout? > > No proxy in between. > > This happens with both IE and Firefox as the browser. I've tried several > things, none of which solved the issue: excel is not returned to browser if > processing server-side takes more than 60 seconds. > > Things I tried: > 1. Set response headers first. I set content type, but I can't set content > length until I create the spreadsheet (takes 60+ seconds). No luck. > 2. add a cookie every 10 seconds or so, hoping that would somehow keep the > connection alive. No luck. > 3. Saved the excel to server file system before streaming it back to > browser, does not solve the time issue. > 4. I wrote my own client that connects via http to the url that would return > an excel, it has the same 60 second issue. > > Elsewhere have seen suggestions that setting content length up front is the > way to go. But, I don't know the content length until I spend the 60+ > seconds creating the content. > > I may have to resort to having the user enter their email address on the web > page and mailing the excel to them when it is finished. Most requests take a > few seconds, the 60+ second request is an exception. > > -----Original Message----- > From: Laubach Shawn Contr 327 CSSG/GFSL [mailto:[EMAIL PROTECTED] > > Sent: Monday, April 04, 2005 4:29 PM > To: POI Users List > Subject: RE: Timeout? > > Are you going through a proxy to access. Some proxies cache the whole thing > before letting it go to the client to virus check and such and the client > might be saying "Hey, this is taking a long time and I'm getting no data. > Bye, Bye." Watch the download amount for one that takes a while (but under > 1 min) and see if doesn't make much programs and then suddenly gets the > file. > > Shawn > > -----Original Message----- > From: Amol Deshmukh [mailto:[EMAIL PROTECTED] > Sent: Monday, April 04, 2005 12:58 PM > To: 'POI Users List' > Subject: RE: Timeout? > > It could be browser timeout (though unlikely since you should > get "Remote connection terminated" or such error in server log). > > why dont you try writing a simple java client (standalone console app) > that connects to you server on the servlet url and see if it can > download the file when download takes more than a min. > > Or try serving some other file (non XLS) that takes more than a > min (or put Thread.sleep(MORE_THAN_60_SECS) in servlet code for testing) > and see if that gives similar problems. > > That will hopefully tell you whether its the browser or the server > that is causing the problem. > > BTW, it does not seem to be POI related > (though I know you could use all the help you can get :) > > HTH, > ~ amol > > > -----Original Message----- > > From: Thompson, Marshall [mailto:[EMAIL PROTECTED] > > Sent: Monday, April 04, 2005 1:49 PM > > To: 'POI Users List' > > Subject: RE: Timeout? > > > > > > That's just it. There is no error in my logs. My servlet completes > > successfully (I know because I traced it.) I am not finding > > any relevant 60 > > second or 1-minute timeout in my config files, or in the > > documentation as a > > default. > > > > -----Original Message----- > > From: Lakshmi Prabha [mailto:[EMAIL PROTECTED] > > Sent: Monday, April 04, 2005 1:20 PM > > To: POI Users List > > Subject: Re: Timeout? > > > > > > Check the config file of the webserver. There should > > be an entry similar to > > <session-timeout>60</session-timeout> > > > > Increase the time, if you want. > > But, did you locate the proplem to be "session > > timeout"? Check your server logs to locate the exact > > proplem. > > > > Regards, > > LP > > --- "Thompson, Marshall" > > <[EMAIL PROTECTED]> wrote: > > > I am using a servlet running under sun java system > > > web server 6.1 and poi to > > > stream an excel to browser. When my servlet takes > > > longer than 60 seconds - > > > the browser never receives the excel, even though > > > the servlet completes > > > successfully. Is there a timeout I need to > > > manipulate somewhere? > > > > > > Marshall Thompson > > > ***Note:The information contained in this message > > > may be privileged and > > > confidential and protected from disclosure. If the > > > reader of this message is > > > not the intended recipient, or an employee or agent > > > responsible for > > > delivering this message to the intended recipient, > > > you are hereby notified > > > that any dissemination, distribution or copying of > > > this communication is > > > strictly prohibited. If you have received this > > > communication in error, > > > please notify the Sender immediately by replying to > > > the message and deleting > > > it from your computer. Thank you. Premier Inc. > > > > > > > > > > > __________________________________ > > Do you Yahoo!? > > Make Yahoo! your home page > > http://www.yahoo.com/r/hs > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > Mailing List: http://jakarta.apache.org/site/mail2.html#poi > > The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ > > ***Note:The information contained in this message may be > > privileged and > > confidential and protected from disclosure. If the reader of > > this message is > > not the intended recipient, or an employee or agent responsible for > > delivering this message to the intended recipient, you are > > hereby notified > > that any dissemination, distribution or copying of this > > communication is > > strictly prohibited. If you have received this communication > > in error, > > please notify the Sender immediately by replying to the > > message and deleting > > it from your computer. Thank you. Premier Inc. > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > Mailing List: http://jakarta.apache.org/site/mail2.html#poi > > The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > Mailing List: http://jakarta.apache.org/site/mail2.html#poi > The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > Mailing List: http://jakarta.apache.org/site/mail2.html#poi > The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ > ***Note:The information contained in this message may be privileged and > confidential and protected from disclosure. If the reader of this message is > not the intended recipient, or an employee or agent responsible for > delivering this message to the intended recipient, you are hereby notified > that any dissemination, distribution or copying of this communication is > strictly prohibited. If you have received this communication in error, > please notify the Sender immediately by replying to the message and deleting > it from your computer. Thank you. Premier Inc. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > Mailing List: http://jakarta.apache.org/site/mail2.html#poi > The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > Mailing List: http://jakarta.apache.org/site/mail2.html#poi > The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ > ***Note:The information contained in this message may be privileged and > confidential and protected from disclosure. If the reader of this message is > not the intended recipient, or an employee or agent responsible for > delivering this message to the intended recipient, you are hereby notified > that any dissemination, distribution or copying of this communication is > strictly prohibited. If you have received this communication in error, > please notify the Sender immediately by replying to the message and deleting > it from your computer. Thank you. Premier Inc. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > Mailing List: http://jakarta.apache.org/site/mail2.html#poi > The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
