Fernando Padilla wrote:
> I am unknowledgable to the Servlet 2.3 specification, so I would like
> pointers to using Tomcat with "Filter"s. If it is as simple as go read
> the spec, then just ignore this.
>
Reading the spec (and the associated API docs) is a good starting point.
You can get it at:
http://java.sun.com/products/servlet/download.html
>
> Currently, my Web Application Architecture has JSP pages which the first
> thing they do is call a helper class to pre-handle the request and setup
> request attributes for it to use. I am guessing this would be a perfect
> use for a "Filter". So I was wondering how to get a Filter working with
> Tomcat.
>
You need want to download Tomcat 4.0, which supports the new spec. There
are also a couple of simple example filters in the "examples" web
application -- check under directory "webapps/examples/WEB-INF/classes".
Getting the filter to run is pretty simple:
* Put your filter in WEB-INF/classes (or in a JAR file in WEB-INF/lib)
* Register it in the WEB-INF/web.xml file, again using the "examples"
web app as a guide. You will need a <filter> element for each filter,
plus at least one <filter-mapping> element to define what requests
within your web app should be seen by this filter.
* Restart Tomcat.
>
> thank you
>
> fernando
>
Craig McClanahan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]