struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hubert Rabago <jakartau...@yahoo.com>
Subject Re: Trouble redirecting
Date Wed, 05 Nov 2003 16:49:41 GMT
If you want to do the redirect from within your Action, you can still use
response.sendRedirect("http://www.yahoo.com"); and then return null to Struts
instead of an ActionForward.

--- Hubert Rabago <jakartauser@yahoo.com> wrote:
> What does your action mapping look like and what are your returning to struts
> from within your Action?
> You can use redirect="true" to redirect to yahoo:
> 
> <action path="..." ....>
> <forward name="redirectToYahoo" path="http://www.yahoo.com" redirect="true"/>
> </action>
> 
> and in your Action:
> return mapping.findForward("redirectToYahoo");
> 
> 
> --- Marcella Turner <mtstruts@hotmail.com> wrote:
> > I'm trying to use a response.sendRedirect("http://www.yahoo.com"); in my 
> > action servlet (yahoo is not my actual goal but i needed to see if 
> > sendRedirect() would work for me at all).
> > 
> > However, I'm getting a NullPointerException from the 
> > org.apache.struts.util.RequestUtils.forwardURL().  I don't understand this 
> > since I'm passing a literal string which represents a URL.
> > 
> > Any pointers would be appreciated.
> > 
> > Marcella
> > 
> > _________________________________________________________________
> > MSN Messenger with backgrounds, emoticons and more. 
> > http://www.msnmessenger-download.com/tracking/cdp_customize
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> http://antispam.yahoo.com/whatsnewfree
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

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


Mime
View raw message