struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Petrelli <brenmcgu...@tariffenet.it>
Subject Re: sendRedirect in Struts
Date Tue, 29 Aug 2006 08:48:10 GMT
Chetan Pandey ha scritto:
> <% 
>
> response.sendRedirect("/loggingAction.do?function=login");
>
> %>
>   

This does not work if your webapp is not in the ROOT context (that is 
the 99% of cases when developing).
Either use a relative path (i.e. remove the first '/') or use:

response.sendRedirect("/" + application.getServletContextName() + "/loggingAction.do?function=login");


HTH
Antonio


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message