Hubert,

Thanks very much for your prompt suggestion :) I tried your first suggestion, but got a 404 error. Is this because the contextPath is getting in the way?

> 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");

The contextPath may prove to be a real problem for me since I would like to transfer control to a servlet in a different contextPath than the one my app is in.


Thanks again,
Marcella

From: Hubert Rabago <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: Trouble redirecting
Date: Wed, 5 Nov 2003 08:49:41 -0800 (PST)

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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> __________________________________
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
> http://antispam.yahoo.com/whatsnewfree
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
From Beethoven to the Rolling Stones, your favorite music is always playing
on MSN Radio Plus. No ads, no talk. Trial month FREE! http://join.msn.com/?page=offers/premiumradio


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to