Hey folks, I was just searching the archives (lots of requests for redirects, but not one similar to what I need).

I'm implementing a Paypal payment gateway, which requires an HTTP call to get a URL from a remote webservice, then I need to redirect the user to that URL.

I have the URL (that part is all coded), now all I need to do is redirect the users browser to http://something.paypal.com/someparameter.

In scriptlet mode, I'd just do:
<%
        String redirectURL = "http://something.paypal.com/someparameterB";;
        response.sendRedirect(redirectURL);
%>

To do this in the struts-way I'd need to make my action responseaware and feed data into it. I'd rather just do something like

String target = "http://somewhere.paypal.com/";;
return "redirect";

then in struts.xml
<result name="redirect" type="redirect-action" "/WEB-INF/jsp/Redirect.jsp"/>

and have my Redirect.jsp have a ${target} in it

How to do this? In short, how do I have a struts action redirect the users browser to an arbitrary (off-site) URL?

        -dbs

--
-------------------.--------.-------------------------------.
Dave Belfer-Shevett \ KB1FWR \ JID: d...@jabber.stonekeep.com \
blog:planet-geek.com >--------'-----------------------------------.
d...@homeport.org    /  7. Twelve-ounce pound cake. (from 'Top 50   \
-------------------<                  Oxymorons')                   |
                    \______________________________________________/

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

Reply via email to