<p> I need to pass information to a payment service site in my struts application. To do this i have to link to another site. I would like to do this via my Action by using a forward of some type. Is this possible? Can I do it with a sendRedirect? How do you "link" to a URL in an Action class? </p> <p> The other option is to put the website address in the forms action parameter, ie: <form action="https://paymentsite.html">. Is there a way to use the struts html form taglib to do this? </p>
In Struts 1.1 you can set up an Action forward to go to any URL, not just local ones. All that's really required is that the receiving URL be prepared to understand what you send it. A JSP can use the <html:link> tag to refer offsite. Of course, somewhere along the line, you'll need to make sure that the user comes back to you! For Web Services-type functions, the server might use a URLConnection class in the Action processor if a fast enough response can be assured. The results coming back through the connection can then be used to select the appropriate action to present to the user.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Jan 25, 2002
So this would be valid then? <forward name="payment" path="https://mypayment/service.html"/> c.
subject: forwarding to a URL outside of the web application