aspose file tools*
The moose likes Servlets and the fly likes ResponseWrapper getOutputStream() not called while retrieving a static resource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "ResponseWrapper getOutputStream() not called while retrieving a static resource" Watch "ResponseWrapper getOutputStream() not called while retrieving a static resource" New topic
Author

ResponseWrapper getOutputStream() not called while retrieving a static resource

Allen Bandela
Ranch Hand

Joined: Feb 16, 2006
Posts: 128

Hello.
My goal: to get to the binary data of the response and cache it. The requests are for zip-files such as /2/005.zip . I'm using an IBM objectgrid as a cache.
My code:


My response wrapper code:

How can I get access to the zip-file in the response, in order to cache it.
While debugging, I noticed that the getOutputStream() method of the responsewrapper is not called. I was assuming that the container would call it. All I found while debugging that the responsewrapper had a SRTServletResponse within it that had my file data (mime-type:application/x-zip).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ResponseWrapper getOutputStream() not called while retrieving a static resource
 
Similar Threads
Stream and writer
Filters - modify response after the target html has delivered / commited it
Problems with Compression Servlet Filter
Response Wrappers and JSPs
Got funny character from compacting servlet