You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Affan Qureshi <qu...@etilize.com> on 2003/01/04 15:19:01 UTC
Filters: Invoked on incoming Request or outgoing response
I am trying out some code to compress the content from my webapp using a
GZIP Filter. But I am confiused about two things.
- Is the filter invoked on incoming requests (or both)? How do we specify
when it is to be invoked?
- After configuring the filter in web.xml I get a garbage respone in the
browser (IE 5.x and NS 7.0). The filter uses GZip to compress the
outputStream it gets from response. But i guess the browser does not
automatically decompress the data. What do I ned to do to make it work.
Thanks and regards,
Affan
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
line breaks
Posted by Affan Qureshi <qu...@etilize.com>.
I am using Struts 1.1b2, Tomcat 4.1.12 LE, on Win2K.
I have a strange issue. I have a TEXTAREA type control that gets populated
from values in database. The value in the database has some line breaks. I
store that value in a variable called: "OLD_VALUE". Then I display the value
in the TEXTAREA and when i get it back(from form-bean) after the form is
submitted (without changing the value) i store it in a variable called
"NEW_VALUE". The two DON'T evaluate String.equals() to "true". When I paste
them in notepad I see that OLD_VALUE has line-breaks while the NEW_VALUE
does not have line breaks.
Has anyone else faced the same problem? I guess it has something to do with
\r and \r\n for line breaks on different platforms.
BTW the data in the database is saved in Oracle 8i through a Swing
client/server app. The App-Server for Swing app is Weblogic on Solaris for
SunSPARC. Then the data gets imported to XML and then to MySQL on Win2K.
Then the Struts app loads and display/edits it in the above form.
Thanks and regards,
Affan
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Filters: Invoked on incoming Request or outgoing response
Posted by "Noel J. Bergman" <no...@devtech.com>.
> I am trying out some code to compress the content from my webapp using a
> GZIP Filter.
> The filter uses GZip to compress the outputStream it gets from
> response.
Did you write this filter? Are you paying attention to the request header
that needs to be honored, and the response header that needs to be set?
ref: http://www.orionserver.com/tutorials/filters/5.html
Whose JVM are you using? A friend running WebSphere found that IBM had done
something wrong in their version of GZIPOutputStream. Switching to GNU
GZIPOutputStream, IIRC which one, fixed his problem.
--- Noel
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>