Thanks Alex. That worked.
 

Alex Shneyderman <[EMAIL PROTECTED]> wrote:
You did not map your filter.

Use filter-mapping element to tell the container what requests need to
be intercepted by your filter

> -----Original Message-----
> From: Kimberly Lane [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 24, 2003 3:49 PM
> To: [EMAIL PROTECTED]
> Subject: doFilter not executing
> 
> Hi, I did not mean to cross post. I sent out the following question a
few
> minutes ago, but my mail server was having a problem so I am not sure
if
> it was through or not! I am sending it using a different account.
> 
> 
> 
> I implemented Filter interface and set it up in my Tomcat container.
The
> funning thing is that only the init() and destroy() methods get
executed
> when I start and shut the server, the doFilter HOWEVER does not get
> executed when I make a request from the web page.
> Am I missing something obvious?
> Here is my code:
> public class MyFilter implements Filter {
> public void init(FilterConfig filterConfig) throws ServletException
{
> /[EMAIL PROTECTED] Implement this javax.servlet.Filter method*/
>
System.out.println("****************************************************
**
> ******
> *");
> System.out.println("My fuilter init");
> }
> public void doFilter(ServletRequest request, ServletResponse
response,
> FilterChain chain) throws IOException, ServletException {
> /[EMAIL PROTECTED] Implement this javax.servlet.Filter method*/
>
System.out.println("****************************************************
**
> ******
> *");
> System.out.println("My filter do fuilter");
> chain.doFilter(request,
> response);
> }
> public void destroy() {
> /[EMAIL PROTECTED] Implement this javax.servlet.Filter method*/
>
System.out.println("****************************************************
**
> ******
> *");
> System.out.println("My filter destroy");
> }
> }
> Here is web.xml:
> 
> zhou
> (UBH) -->
> > "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> 
> 
> 
> Struts Example Application
> 
> 
> 
> action
> ubh.web.servlet.UBHActionServlet
> 
> 
config

> 
/WEB-INF/struts-config.xml

> 
> 
> 
mapping

> 
ubh.web.action.UBHActionMapping

> 
> 1
> 
> 
> 
> action
> *.do
> 
> 
> MyFilter
> filter.MyFilter
> 
> 
> 
> 
> 
> 
> 
> index.jsp
> 
> 
> 
> /WEB-INF/app.tld
> /WEB-INF/app.tld
> 
> 
> 
> /WEB-INF/struts-bean.tld
> /WEB-INF/struts-bean.tld
> 
> 
> /WEB-INF/struts-html.tld
> /WEB-INF/struts-html.tld
> 
> 
> /WEB-INF/struts-logic.tld
> /WEB-INF/struts-logic.tld
> 
> 
> 
> 
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Reply via email to