struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kimberly Lane <kimberly7...@yahoo.com>
Subject Re: doFilter not executing
Date Thu, 24 Jul 2003 20:16:24 GMT
You are right. I did read it from this link:
 
http://edocs.bea.com/wls/docs70/webapp/filters.html#172613
 
 
However, I put it after servlet declration on purpose and it worked. I am running Tomcat 5
 
I do not know why.
 
 

Alen Ribic <alenr@mweb.co.za> wrote:
Correct me if I'm wrong, AFAIK filter specific descriptor tags need to be
located before servlet declarations.

--Alen


----- Original Message -----
From: "Alex Shneyderman" 
To: "'Struts Users Mailing List'" 
Sent: Thursday, July 24, 2003 9:50 PM
Subject: RE: doFilter not executing


> 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:kimberly7680@yahoo.com]
> > Sent: Thursday, July 24, 2003 3:49 PM
> > To: struts-user@jakarta.apache.org
> > 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
> {
> > /**@todo 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 {
> > /**@todo Implement this javax.servlet.Filter method*/
> >
> System.out.println("****************************************************
> **
> > ******
> > *");
> > System.out.println("My filter do fuilter");
> > chain.doFilter(request,
> > response);
> > }
> > public void destroy() {
> > /**@todo 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: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message