Hi,
I have a servlet and a filter I want to be run when that servlet
is accessed.  However, the servlet is never accessed directly via
the browser.  Rather, it's embedded in a frameset and launched
using something like this:
<a href="javascript:void(0);" 
   onClick="thatframe.src='http://myhost/mycontext/myservlet'; return
true;">
click here
</a>

So in my web.xml, I have:
<filter>
  <filter-name>myFilter</filter-name>
  <filter-class>myFilterClass</filter-class>
</filter-name>

<filter-mapping>
  <filter-name>myFilter</filter-name>
  <servlet-name>myServlet</servlet-name>
</filter-mapping>

<servlet>
  <servlet-name>myServlet</servlet-name>
  <servlet-class>myServletClass</servlet-class>
</servlet>

The problem is, tomcat never calls doFilter() for my filter when that
servlet is called.  The filter gets initialized appropriately (I have
logging comments on the filter's init(), doFilter(), destroy() methods).

If I go to http://myhost/mycontext/myservlet myself, the filter does
get called, so I know it has to do with the calling mechanism,
filter-mapping,
or something along these lines.

Thanks in advance, and sorry for the long post,

Yoav Shapira
Millennium Pharmaceuticals, Inc.
[EMAIL PROTECTED]

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to