This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Filters  RSS feed

 
Sondra Colagrossi
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I been shopping in the pet store and I'm confused about how the FilterChain gets setup.
The following element is from the 2.3 DTD.
<!ELEMENT filter-mapping (filter-name, (url-pattern | servlet-name))>
So if I have the following in my deployment descriptor:
<filter-mapping>
<filter-name> filter_1 </filter-name>
<servlet-name> myServlet </servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name> filter_2 </filter-name>
<servlet-name> myServlet </servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name> filter_3 </filter-name>
<servlet-name> myServlet </servlet-name>
</filter-mapping>
I can expect the container to setup the FilterChain of filter_1, filter_2, filter_3.
The FilterChain.doFilter( req, res ) is a call from filter to filter?
[ December 17, 2002: Message edited by: Bob Fred ]
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bob,
Your assumption is correct: the container will setup the filter chaining for you.
However, you will need to indicate (in your filter code) when this chaining occurs. This is where you will have to call the chain.doFilter (request, response) method.
Cheers
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!