The Artima Developer Community
Sponsored Link

Java Buzz Forum
GZIPFilter and OC4J

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Andrej Koelewijn

Posts: 594
Nickname: andrejk
Registered: Nov, 2002

Andrej Koelewijn is a Java and Oracle consultant
GZIPFilter and OC4J Posted: Mar 22, 2004 2:30 AM
Reply to this message Reply

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
Latest Java Buzz Posts
Latest Java Buzz Posts by Andrej Koelewijn
Latest Posts From Andrej Koelewijn

Advertisement

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:

doFilter> /prismant/checkaccount.do
GZIP supported, compressing.
writing...
writing...
writing...
writing...

But in OC4J the following happends:

doFilter> /prismant_dev/checkaccount.do
GZIP supported, compressing.
doFilter> /prismant_dev/overzicht.do
GZIP supported, compressing.
writing...
writing...
writing...
writing...
writing...
writing...

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?

Read: GZIPFilter and OC4J

Topic: Alternative uses for Professional JSP, 2nd Edition Previous Topic   Next Topic Topic: TagUnit 1.0.1 available

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use