sendRedirect problem with absolute URL
843841May 31 2006 — edited May 31 2006Hello all,
I am having trouble with the sendRedirect method
The URL im trying to redirect is on another server.
A fragment code of my servlet is the following
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
......
try{
response.sendRedirect(URL);}
catch (Exception e) {logger.debug("Error in redirection"+e.getMessage());}
}
,I get nothing and no exceptions.
When I tried redirecting to a relative url (a jsp in my webapp) the redirection works fine.
I havent found anything saying that sendRedirect works only with relative URLs.
Is there something more i have to do for the redirection to work?
Is there any other way of redirecting to another server?
Thanks,
Panagiotis