File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Servlet Filter Redirection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet Filter Redirection" Watch "Servlet Filter Redirection" New topic

Servlet Filter Redirection

PJ Crump
Ranch Hand

Joined: Feb 06, 2002
Posts: 51
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;

Any ideas??
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

The redirect does not work.

Can you describe what does happen?
"does not work" can mean a lot of things.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
PJ Crump
Ranch Hand

Joined: Feb 06, 2002
Posts: 51
It never forwards the request to the 2nd server. The filter responds with the regular output. There is no exception that is thrown..
I agree. Here's the link:
subject: Servlet Filter Redirection
jQuery in Action, 3rd edition