Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
I have a servlet running under Sun Java Web Server 6.1 that uses the apache POI library to create an excel spreadsheet, then stream it back to the browser . This works fine unless the servlet takes more than 60 seconds to do it's processing. If it takes more than 60 seconds, the excel is never served to the browser. However; I know the servlet finishes successfully with no errors. (I have logging enabled.) I can't find any web server settings or defaults that would seem to control this. Is this a client browser thing? It happens with both IE and FireFox.
This happens with both IE and Firefox as the browser. I've tried several things, none of which solve d 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.
F is for finger. Can you stick your finger in your nose? Doesn't that feel nice? Now try this tiny ad:
ScroogeXHTML - fast RTF to HTML and XHTML conversion