tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cox, Charlie" <c...@cincom.com>
Subject RE: How to do filter after Servlet?
Date Mon, 01 Apr 2002 11:51:21 GMT
look at the sample filters, you will see a call to doChain(). This is where
your servlet will be processed. Any code before it will be executed before
your servlet, and code after it will be executed after your servlet
finishes.

Charlie

> -----Original Message-----
> From: Alvin Wang [mailto:xwang@qtechservices.com]
> Sent: Thursday, March 28, 2002 3:07 PM
> To: Tomcat Users List; ccox@cincom.com
> Cc: SERVLET-INTEREST
> Subject: RE: How to do filter after Servlet?
> 
> 
> Charlie, do you mean to call doChain() in servlet? I am not sure if I
> understand you.
> 
> "your code" means my filter code?
> "put your code there" means where?
> "you need to call doChain() first", from where? Servlet?
> 
> Sorry for my confusion. Thanks!
> 
> 
> 
> -----Original Message-----
> From: Cox, Charlie [mailto:ccox@cincom.com]
> Sent: Thursday, March 28, 2002 11:23 AM
> To: 'Tomcat Users List'
> Subject: RE: How to do filter after Servlet?
> 
> 
> the doChain() in a filter is what calls the next filter or 
> serlvet in the
> chain, so if you want your code to process the servlet's 
> result, then you
> need to call doChain() first, then put your code there.
> 
> you will need a custom HttpServletResponse object if you want 
> to view any
> part of the response.
> 
> Charlie
> 
> > -----Original Message-----
> > From: Alvin Wang [mailto:xwang@qtechservices.com]
> > Sent: Wednesday, March 27, 2002 5:02 PM
> > To: Tomcat Users List
> > Subject: How to do filter after Servlet?
> > Importance: High
> >
> >
> > Hi! This is naive. All the examples I saw about filter are
> > "pre-servlet"
> > filters. So how to do a "post-servlet" filter? Do I need to setup in
> > web.xml? Or do I need to do it in code (servlet/filter)?
> >
> > Can any guru give me a sample?
> >
> > Thanks a lot!
> >
> >
> > --
> > To unsubscribe:   
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
>

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message