The DefaultServlet will also serve parts of a file if the file is a physical file. (I think it works fine for war files too) If you need to see an example how partial responses work in a servlet, see the DefaultServlet.
If you can select parts of the blob from the database, then you are in luck. If you must read in the entire blob, then you might have a performance issue.
-Tim
Aditya wrote:
I have a servlet returning PDF stored as a large-object in a database. I was recently asked why "byte-serving" wasn't turned on and I'm at a loss to try to understand the situation. From what I've found/understood:
- byte-serving is the term Adobe uses when "chunks" of a PDF are returned by the server, each with a "byterange" header so that the PDF display program can start displaying immediately instead of having to wait for the entire file to be downloaded
- AFAICT, Apache supported this automatically starting in 1.3.14 or so, and it seems implictly enabled in Apache 2.0 according to:
http://httpd.apache.org/docs-2.0/developer/filters.html
- it sounds like even if there was a way to convince mod_jk to support this, it wouldn't really work since you can't "stream" the response to the client from Tomcat via mod_jk via Apache
- and since the entire PDF would be returned as part of a single SQL request, it doesn't provide any efficiency/performance gain for Tomcat or even Apache
I'm running Tomcat 4.1 fronted by mod_jk 1.2.5-dev with Apache 2.0.46
So is there anything I'm missing? is there a way to implement short of serving the PDFs from disk directly by Apache?
thanks, Adi
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]