• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to divert (redirect) a request from a filter?

 
Rajesh Khan
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to redirect a request made to servlet "b" but instead servlet b does get called . Is there anything wrong with redirecting this way in a filter
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64716
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the filter actually being invoked?
 
Rob Spoor
Sheriff
Pie
Posts: 20512
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since you're not calling chain.doFilter(request, response) the servlet shouldn't be called at all. I'm with Bear on this one; make sure the filter is called in the first place.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic