aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Filter not working  with jsp:include Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Filter not working  with jsp:include" Watch "Filter not working  with jsp:include" New topic
Author

Filter not working with jsp:include

Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 547

Hi,

My filter works for direct requests to the web server but not for requests that come from included JSP pages.

For example, I have this filter mapping for a.jsp and b.jsp. In a.jsp, I have included this: <jsp:include page="b.jsp"/>

<filter-mapping>
<filter-name>FilterRequestTest</filter-name>
<url-pattern>/a.jsp</url-pattern>
</filter-mapping>

<filter-mapping>
<filter-name>FilterRequestTest</filter-name>
<url-pattern>/b.jsp</url-pattern>
</filter-mapping>

The filter works for a.jsp but does not work for b.jsp.

I am wondering:
would <dispatcher>INCLUDE</dispatcher> resolve my problem ?
Since this is an included request (not dispatched though).

Thanks.


SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCBCD 5
Visit my blog
Niranjan Deshpande
Ranch Hand

Joined: Oct 16, 2005
Posts: 1277
yes
it might help


SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ]
Performance is a compulsion, not a option, if my existence is to be justified.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Filter not working with jsp:include