This post originated from an RSS feed registered with Java Buzz
by Andrej Koelewijn.
Original Post: GZIPFilter and OC4J
Feed Title: Andrej Koelewijn
Feed URL: http://feeds.feedburner.com/AndrejKoelewijn
Feed Description: On Oracle, Java and OpenSource
Filters seem to work different in OC4J than in Tomcat. I'm running OC4J version 9.0.3 and Tomcat 4.1.30, same J2EE version i think, so they should behave the same, but somehow they don't.
The problems occur when one struts action forwards to another, instead of to a jsp page. For example, I have one action checkaccount, which validates the username and password entered by a user, and if it's incorrect the login jsp is displayed. When the values entered by the user are correct i forward (by specifying another *.do page in the struts config) to another action, which fetches some data and then displays a table of contents jsp.
I've specified that the GZIPfilter should applied to every *.do url, so that the output generated by an action will be compressed. When logging in correctly the following happends in tomcat:
As you can see, tomcat executes the filter only once, whereas OC4J executes it twice. In the browser, the html generated by tomcat displays correctly, but when using oc4j the browser displays a lot of nonsense. Maybe because the html page is compressed twice, and the browser only decompresses it once?