Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / October 2005

Tip: Looking for answers? Try searching our database.

Servlet Redirect problem

Thread view: 
PJ - 29 Sep 2005 23:12 GMT
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.  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??
deadsea - 04 Oct 2005 12:57 GMT
> servResp.sendRedirect("http://otherserver:8080");

I would first try a url with a fully qualified domain
name.servResp.sendRedirect("http://otherserver.example.com:8080/");

Also when you say that it doesn't work, how do you know that it doesn't
work?  Are you sniffing the network and you don't see a 302 status and
a Location header?  Does the client not actually follow the redirect?

If the status is 302 and there is a Location header but the client
doesn't follow it, I would suggest debugging the client.

Stephen
http://ostermiller.org/utils/
deadsea - 04 Oct 2005 12:58 GMT
> servResp.sendRedirect("http://otherserver:8080");

I would first try a url with a fully qualified domain
name.servResp.sendRedirect("http://otherserver.example.com:8080/");

Also when you say that it doesn't work, how do you know that it doesn't
work?  Are you sniffing the network and you don't see a 302 status and
a Location header?  Does the client not actually follow the redirect?

If the status is 302 and there is a Location header but the client
doesn't follow it, I would suggest debugging the client.

Stephen
http://ostermiller.org/utils/


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.