Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet Filter Redirection

 
PJ Crump
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a soap message (axis) coming into a server. Because I don't
want to handle certain types of requests, I have created a servlet
filter to do the checking for me and to route the request to a <different> physical server. When the servlet filter kicks off
all is good until I try to redirect the request to the third server.
The redirect does not work. Here is the code from my filter..

....
//I check the request for the condition that I'm looking for
// if the condition exists, then i want to redirect this request to
another server..

HttpServletResponse servResp = (HttpServletResponse)response;
servResp.sendRedirect("http://otherserver:8080");
return;
...

Any ideas??
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The redirect does not work.


Can you describe what does happen?
"does not work" can mean a lot of things.
 
PJ Crump
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It never forwards the request to the 2nd server. The filter responds with the regular output. There is no exception that is thrown..
 
no wonder he is so sad, he hasn't seen this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!