Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • 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
  • 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: 20665
65
Chrome Eclipse IDE Java Windows
  • Likes 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: 65220
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic