tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian H" <sum.of.pri...@gmail.com>
Subject compiled header filter on tomcat 5.5
Date Tue, 05 Dec 2006 17:09:38 GMT
Hi all,

I've taken the jspbook.jar found on page two of this article:
http://www.onjava.com/pub/a/onjava/2004/03/03/filters.html and
implement the ResponseHeaderFilter on a test server successfully using
the following in web.xml:

<filter>
  <filter-name>ResponseHeaderFilter</filter-name>
  <filter-class>com.jspbook.ResponseHeaderFilter</filter-class>
  <init-param>
    <param-name>Testingtesting</param-name>
    <param-value>123</param-value>
  </init-param>
</filter>
<filter-mapping>
   <filter-name>ResponseHeaderFilter</filter-name>
   <url-pattern>/*</url-pattern>
</filter-mapping>

When I create a ResponseHeaderFilter.java file containing the source
from that article, omitting the package information, it compiles
without error, but does not work, with only
  SEVERE: Error filterStart
  5/12/2006 09:03:50 org.apache.catalina.core.StandardContext start
  SEVERE: Context startup failed due to previous errors
that I can see that indicates a problem, in the stdout.log  [I wind up
with the same problem if I put the package info back in, recompile it,
and incorporate it into jspbook.jar...I notice that the length of the
*.class files are rather different]

What should I try in order to make my own ResponseHeaderFilter.class work?
[Once that's sorted out, it should be trivial to substitute setHeader
for addHeader, allowing me to have setHeaderFilter.class and
addHeaderFilter.class]

Thank you in advance,

Ian

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message