File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Response Wrappers and JSPs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Response Wrappers and JSPs" Watch "Response Wrappers and JSPs" New topic

Response Wrappers and JSPs

Victor Dolirio
Ranch Hand

Joined: Aug 21, 2008
Posts: 57
Hi ranchers,

I�ve build a Filter to handle a response wrapper to compress data mapped for every resources in my application (<utl-pattern>/*</url-pattern> and it works well when I access a servlet and jsps that received a forward by another servlet, but when I try access jsps directly nothing is sended to client and no exceptions are throwed across the request process, while debbuging I notice the getWriter method of my wrapper class was called but the writer method of my response class didn�t. Can some one figure out what is happening? I�m using tomcat.

thanks all.
[ September 12, 2008: Message edited by: Victor Dolirio ]

If happen something bad in you life, don't ask God why it happened. Ask for what.
SCJP 5 (80%) - SCWCD 5 (91%) - SCBCD & SCJD coming soon...
Victor Dolirio
Ranch Hand

Joined: Aug 21, 2008
Posts: 57
Have anybody any ideia?
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33102

Please allow at least 24 hours for replies. Many people are in different timezones and go on JavaRanch once a day.

Can you show the piece of code where it gets stuck?

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Victor Dolirio
Ranch Hand

Joined: Aug 21, 2008
Posts: 57
The doFilter�s Filter method:

The Compress Response Wrapper:

and the decorator compress output:

thanks all.
[ September 16, 2008: Message edited by: Victor Dolirio ]
I agree. Here's the link:
subject: Response Wrappers and JSPs
It's not a secret anymore!