This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Doubt on Filters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Doubt on Filters" Watch "Doubt on Filters" New topic
Author

Doubt on Filters

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9470
    
    2

Guys,

Can we use <servlet-name> and <dispatcher> together for a filter DD mapping?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Yes you can. For example :

If you try to include the JothiServlet using a RequestDispatcher#include, the request will be filtered. You can get a RequestDispatcher by a servlet name via ServletContext#getNamedDispatcher:


[My Blog]
All roads lead to JavaRanch
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9470
    
    2

Thanks Christophe!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt on Filters