valve - Tomcat specific
filter - "Like" a valve but portable across other servlet containers because its part of the serlvet specification.
requests/response can be wrapped by the Servlet wrapper classes which are part of the Servlet API. A book will really help clear the specifics up of why and when to use them.
Never ever use catalina classes directly unless: - You really need to - You really know why you are using them - You really need to
-Tim
Gavin, Rick wrote:
Thanks Bill,
Does anyone have some docs about using this feature? I haven't been able
to find much on the jakarta site. I'm a bit confused as to what the
difference between a <valve> and a <filter> is. and which is the corret one
to use. When i search for filter, i get info on <valve>s. I haven't found
anything on how to use a <filter>.
Also, if i use a wrapper to extend the request/response objects, does that mean in a JSP page i would be able to access any extra methods i wanted to add.. such as..
-- in jsp file -- String value = request.doMyNewAction(param1);
is it recommeded to use the catalina wrapper objects when working with tomcat or the javax wrappers?
org.apache.catalina.connector.HttpRequestWrapper or javax.servlet.http.HttpServletRequestWrapper
Thanks for the help,
Rick
-----Original Message----- From: Bill Barker [mailto:[EMAIL PROTECTED] Sent: Friday, March 14, 2003 7:29 PM To: [EMAIL PROTECTED] Subject: Re: Extending HttpServletRequest / HttpServletResponse ???
It depends on the version. The answer is no for Servlet-2.2 containers (e.g. Tomcat 3.x). The answer is yes for Servlet-2.3 containers (e.g. Tomcat 4.x). In fact, for Servlet-2.3 containers it is one of the most common things that a Filter does.
If you are using Tomcat 4.x, then look into HttpServletRequestWrapper and HttpServletResponseWrapper (both in the javax.servlet.http package).
"Gavin, Rick" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
Hi All Is it possible to extend request and response objects to add a few
custom
properties and / or methods relating to a particular system, and have
tomcat
use those instead of the standard request and resonse objects?
Thanks,
Rick
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
