This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets 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

Filter not working with jsp:include

Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 547


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"/>



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).


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

Joined: Oct 16, 2005
Posts: 1277
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.
Don't get me started about those stupid light bulbs.
subject: Filter not working with jsp:include
Similar Threads
Spring security intercept-url question
Difference JSP File & JSP Page
How do servlet mapping in web.xml that the path information is not lost
Request parameters not being passed through Filter
<jsp:include TO_ACTION/> do not work on WAS 6.1