This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


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: 549

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Filter not working with jsp:include
 
It's not a secret anymore!