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

How to find the servlet name that has been maped to a filter

 
nacassa sam
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a filter class and i need to get the servlet name mapped to a filter (filter mapping object has the filter name and the corresponding servlet name, I need to get the servlet name from the mapping) is there any way in servlet api 2.5 to do this?
 
Rob Spoor
Sheriff
Pie
Posts: 20369
44
Chrome Eclipse IDE Java Windows
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would your filter need to know this information? It shouldn't care what the next step in handling the request is, and just call doFilter on the FilterChain. The web container will then make sure the next step (another filter, a servlet, a JSP file, static content) is called.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64173
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I agree with Rob. The fact that you think that you need this is a good indication of a design flaw. Why do you feel that you need this information, and what do you plan to do with it?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic