tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From todd runstein <todd_...@yahoo.com>
Subject Filtering responses
Date Mon, 31 Jul 2006 21:03:20 GMT
I'm trying to set up a response filter, but am running
into problems.  My main page and some jsps render
properly.  Others don't return anything at all (I hate
getting back plain white pages).

Anyway, I'm not sure what makes some jsps work and
others fail.  I'm also not sure how to troubleshoot
this (other than trial and error, which isn't going
well).

I'm not getting any errors (adding to my frustration
and feelings of helplessness).  I've attached the
source code for the filter.  I'm including the filter
related entries from my web.xml file, as well as some
of the output (you'll see the logging statement in the
source code).  It seems odd to me that the good pages
have a lot of logged output while the bad ones have
very little output.

Any suggestions, ideas or help would be greatly
appreciated!  I'm running this on Fedora Core 3, using
Tomcat 5.0.19 with JDK 1.4.2_07.  If I've left
anything out, please let me know.

Todd

The relevant portions of web.xml:

<filter>
  <filter-name>dateFormatter</filter-name>
 
<filter-class>msei.manu.web.servlets.DateFormatFilter
  </filter-class>
</filter>
<filter-mapping>
  <filter-name>dateFormatter</filter-name>
  <url-pattern>/*</url-pattern>
  <dispatcher>REQUEST</dispatcher>
  <dispatcher>FORWARD</dispatcher>
  <dispatcher>INCLUDE</dispatcher>
</filter-mapping>


Here's the log output from a good request:
INFO http8080-Processor23
msei.manu.web.servlets.DateFormatFilter - Filtering
response
DEBUG http8080-Processor23
msei.manu.web.servlets.DateFormatFilter - PrintWriter
getting called
DEBUG http8080-Processor23
msei.manu.web.servlets.DateFormatFilter -
getOutputStream has been called
DEBUG http8080-Processor23
msei.manu.web.servlets.DateFormatFilter - IsClosed =
false
DEBUG http8080-Processor23
msei.manu.web.servlets.DateFormatFilter - Filter is
checking outbound content
DEBUG http8080-Processor23
msei.manu.web.servlets.DateFormatFilter - Bytes is
327680
INFO http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Filtering
response
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter -
getOutputStream has been called
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter -
getOutputStream has been called
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - IsClosed =
false
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Filter is
checking outbound content
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Bytes is
3799
INFO http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Filtering
response
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter -
getOutputStream has been called
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter -
getOutputStream has been called
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - IsClosed =
false
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Filter is
checking outbound content
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Bytes is
47240
INFO http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Filtering
response
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter -
getOutputStream has been called
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter -
getOutputStream has been called
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - IsClosed =
false
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Filter is
checking outbound content
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Bytes is
3455
INFO http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Filtering
response
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter -
getOutputStream has been called
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter -
getOutputStream has been called
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - IsClosed =
false
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Filter is
checking outbound content
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Bytes is
8302
INFO http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Filtering
response
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter -
getOutputStream has been called
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - IsClosed =
false
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Filter is
checking outbound content
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Bytes is 0
INFO http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Filtering
response
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter -
getOutputStream has been called
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - IsClosed =
false
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Filter is
checking outbound content
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Bytes is 0
INFO http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Filtering
response
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter -
getOutputStream has been called
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - IsClosed =
false
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Filter is
checking outbound content
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Bytes is 0
INFO http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Filtering
response
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter -
getOutputStream has been called
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - IsClosed =
false
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Filter is
checking outbound content
DEBUG http8080-Processor25
msei.manu.web.servlets.DateFormatFilter - Bytes is 0


And here's one from a bad request (one that doesn't
have any output):

INFO http8080-Processor24
msei.manu.web.servlets.DateFormatFilter - Filtering
response
DEBUG http8080-Processor24
msei.manu.web.servlets.DateFormatFilter - PrintWriter
getting called
DEBUG http8080-Processor24
msei.manu.web.servlets.DateFormatFilter -
getOutputStream has been called
DEBUG http8080-Processor24
msei.manu.web.servlets.DateFormatFilter - IsClosed =
false
DEBUG http8080-Processor24
msei.manu.web.servlets.DateFormatFilter - Filter is
checking outbound content
DEBUG http8080-Processor24
msei.manu.web.servlets.DateFormatFilter - Bytes is 0



S.O.S.  Please send help!


The only "dumb question" is the one you were too afraid to ask.
________________________________________
Check out RouteRuler - Free software for runners, cyclists, walkers, etc.
http://routeruler.sourceforge.net
________________________________________
Get a handle on your data with "pocOLAP", the "little" OLAP project
http://pocolap.sourceforge.net
________________________________________

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Mime
View raw message