tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject Re: issue setting headers in a filter....
Date Tue, 14 Jan 2003 00:03:41 GMT
Jacob,

You may want to check out the GZIP filter that ships with TC:

$CATALINA_HOME/webapps/examples/WEB-INF/classes/compressionFilters

Jacob Kjome wrote:
> I brought this issue up previously in a question about a GZIP servlet filter
> which I had based on an example that was supposed to have worked on
> the Orion server.  I still have gotten nowhere.  The curious thing is
> that it works fine when serving a static html file, but fails when
> serving jsp's or servlets.
> 
> I get the following output from the enabling the RequestDumperValve...
> 
> serving html file:
> 
> 2003-01-13 16:47:13 RequestDumperValve[Standalone]:           authType=null
> 2003-01-13 16:47:13 RequestDumperValve[Standalone]:      contentLength=1028
> 2003-01-13 16:47:13 RequestDumperValve[Standalone]:        contentType=text/html
> 2003-01-13 16:47:13 RequestDumperValve[Standalone]:             header=ETag=W/"4314-1042494855341"
> 2003-01-13 16:47:13 RequestDumperValve[Standalone]:             header=Last-Modified=Mon,
13 Jan 2003 21:54:15 GMT
> 2003-01-13 16:47:13 RequestDumperValve[Standalone]:             header=Content-Type=text/html
> 2003-01-13 16:47:13 RequestDumperValve[Standalone]:             header=Content-Length=1028
> 2003-01-13 16:47:13 RequestDumperValve[Standalone]:             header=Vary=Accept-Encoding
> 2003-01-13 16:47:13 RequestDumperValve[Standalone]:             header=Content-Encoding=gzip
> 2003-01-13 16:47:13 RequestDumperValve[Standalone]:             header=Date=Mon, 13 Jan
2003 22:47:13 GMT
> 2003-01-13 16:47:13 RequestDumperValve[Standalone]:             header=Server=Apache
Coyote/1.0
> 2003-01-13 16:47:13 RequestDumperValve[Standalone]:            message=null
> 2003-01-13 16:47:13 RequestDumperValve[Standalone]:         remoteUser=null
> 2003-01-13 16:47:13 RequestDumperValve[Standalone]:             status=200
> 
> 
> serving a jsp:
> 
> 2003-01-13 16:53:48 RequestDumperValve[Standalone]:           authType=null
> 2003-01-13 16:53:48 RequestDumperValve[Standalone]:      contentLength=-1
> 2003-01-13 16:53:48 RequestDumperValve[Standalone]:        contentType=text/html;charset=ISO-8859-1
> 2003-01-13 16:53:48 RequestDumperValve[Standalone]:             cookie=JSESSIONID=A4580FFD343158FB037CA7C89AB8BAAB;
domain=null; path=/peopleservices
> 2003-01-13 16:53:48 RequestDumperValve[Standalone]:             header=Content-Type=text/html;charset=ISO-8859-1
> 2003-01-13 16:53:48 RequestDumperValve[Standalone]:             header=Set-Cookie=JSESSIONID=A4580FFD343158FB037CA7C89AB8BAAB;
Path=/peopleservices
> 2003-01-13 16:53:48 RequestDumperValve[Standalone]:             header=Transfer-Encoding=chunked
> 2003-01-13 16:53:48 RequestDumperValve[Standalone]:             header=Date=Mon, 13 Jan
2003 22:53:48 GMT
> 2003-01-13 16:53:48 RequestDumperValve[Standalone]:             header=Server=Apache
Coyote/1.0
> 2003-01-13 16:53:48 RequestDumperValve[Standalone]:            message=null
> 2003-01-13 16:53:48 RequestDumperValve[Standalone]:         remoteUser=null
> 2003-01-13 16:53:48 RequestDumperValve[Standalone]:             status=200
> 
> 
> Notice that filter set the "Vary" and "Content-Encoding" headers for
> the HTML file, but not for the JSP file.  Obviously the filter is
> generally working because it successfully compressed and set headers
> for the HTML file.  What makes JSP's and servlets different?  Why
> aren't the headers being set in those cases only?????   The GZipping
> works just fine, it is just that the headers don't get set.  What the
> heck???
> 
> I'm attaching the GZIP filter for reference.
> 
> Thanks,
> 
> Jake
> 
> 
> 
> ------------------------------------------------------------------------
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>

-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.com/>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message