This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Filter in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Filter in servlet" Watch "Filter in servlet" New topic
Author

Filter in servlet

Mukesh Prajapati
Greenhorn

Joined: Feb 02, 2011
Posts: 10
is it possible to apply one Filter to more than two Servlet??? please reply soon...... please give me such example. how to do it?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Yes, it is possible.

Why do you ask? Did you have some problem when you tried to do it?
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
You can just map the filter to be executed on the urls that match your servlets.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Stoian Azarov
Ranch Hand

Joined: Jun 01, 2011
Posts: 113
And an example:
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Filter in servlet
 
Similar Threads
Redirecting to login.jsp page?
Tracking users and user security
Struts Filter
url rewrite
Return to Login Page