struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: How to specify a URL in the path
Date Sun, 05 Aug 2001 21:35:55 GMT


On Wed, 1 Aug 2001 VPavithran@drivelogic.com wrote:

> 
> Hi
> 
> How do I specify a URL in the below
> 
>  <forward name="sessionTimeOut" path="/abc.jsp" />
> 
> Instead of /abc.jsp , I need it to go to say http://www.something.com
> Can this be done ?
> 

Normally, Struts uses a RequestDispatcher.forward() to switch the user to
the requested page, and this only works within the same webapp.  However,
you can set up your <forward> to do a redirect instead:

  <forward name="sessionTimeOut" redirect="true"
           path="http://www.something.com"/>

and Struts will do a response.sendRedirect() to this URL, instead of a
RequestDispatcher.forward().

> Thanks
> Vipin
> 
> 
Craig



Mime
View raw message