File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Filter in servlet

 
Mukesh Prajapati
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 20164
24
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it is possible.

Why do you ask? Did you have some problem when you tried to do it?
 
Bosun Bello
Ranch Hand
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can just map the filter to be executed on the urls that match your servlets.
 
Stoian Azarov
Ranch Hand
Posts: 113
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And an example:
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic