Re: Need to lookup additional data to append to redirection to outside web site
Hi, Set the attributes in the request (request.setAttribute(name, value);) then dispatch the request. RequestDispatcher dispatcher = getServletContext() .getRequestDispatcher(URL of the page); dispatcher.forward(request, response); On Tue, Jun 21, 2011 at 7:14 AM, John Himpel j...@jlhimpel.net wrote: Good evening, I have an S2 application the needs to: 1) Verify some input parameters (I know how to do this) 2) Retrieve some additional data based upon the input parameters (I know how to do this). 3) Then format a post type http request with hidden fields containing data from #1 and #2 above to be sent via https to an outside vendor provided web based application running in the outside vendor's domain. 4) The vendor app will then process the application to completion. I believe I know how to do this as a get http request by defining the redirect result in struts.xml. However, I'm at a loss on how do this via a post request. Any advise would be greatly appreciated. Thanks. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Regards Kushan Jayathilake
Re: Need to lookup additional data to append to redirection to outside web site
On Mon, 2011-06-20 at 20:44 -0500, John Himpel wrote: Good evening, I have an S2 application the needs to: 1) Verify some input parameters (I know how to do this) 2) Retrieve some additional data based upon the input parameters (I know how to do this). 3) Then format a post type http request with hidden fields containing data from #1 and #2 above to be sent via https to an outside vendor provided web based application running in the outside vendor's domain. 4) The vendor app will then process the application to completion. I believe I know how to do this as a get http request by defining the redirect result in struts.xml. However, I'm at a loss on how do this via a post request. Any advise would be greatly appreciated. To facilitate HTTP comms between your action and a third party web-app you may wish to look at the client portion of Apache HTTPComponenents http://hc.apache.org/ (which I've never used although I've used it in it's previous incarnation as HttpClient) or HttpUnit (http://httpunit.sourceforge.net/) which is heavier and emulates a browser in it's own right. Originally designed for unit-testing web pages, it works well when used to scrape third-party web-apps, form-fill etc etc. Regards - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Need to lookup additional data to append to redirection to outside web site
The servlet dispatcher can only forward to local servlets and jsps, so it's not really an option. Anyway, usually it's not a good idea flowing unsecure parameters from http to https, you could try to pass via javascript (through jquery [1]), but it's always a security risk. [1] http://api.jquery.com/jQuery.post/ On 21 June 2011 09:41, Roger Varley roger.var...@googlemail.com wrote: On Mon, 2011-06-20 at 20:44 -0500, John Himpel wrote: Good evening, I have an S2 application the needs to: 1) Verify some input parameters (I know how to do this) 2) Retrieve some additional data based upon the input parameters (I know how to do this). 3) Then format a post type http request with hidden fields containing data from #1 and #2 above to be sent via https to an outside vendor provided web based application running in the outside vendor's domain. 4) The vendor app will then process the application to completion. I believe I know how to do this as a get http request by defining the redirect result in struts.xml. However, I'm at a loss on how do this via a post request. Any advise would be greatly appreciated. To facilitate HTTP comms between your action and a third party web-app you may wish to look at the client portion of Apache HTTPComponenents http://hc.apache.org/ (which I've never used although I've used it in it's previous incarnation as HttpClient) or HttpUnit (http://httpunit.sourceforge.net/) which is heavier and emulates a browser in it's own right. Originally designed for unit-testing web pages, it works well when used to scrape third-party web-apps, form-fill etc etc. Regards - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Maurizio Cucchiara - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Need to lookup additional data to append to redirection to outside web site
Good evening, I have an S2 application the needs to: 1) Verify some input parameters (I know how to do this) 2) Retrieve some additional data based upon the input parameters (I know how to do this). 3) Then format a post type http request with hidden fields containing data from #1 and #2 above to be sent via https to an outside vendor provided web based application running in the outside vendor's domain. 4) The vendor app will then process the application to completion. I believe I know how to do this as a get http request by defining the redirect result in struts.xml. However, I'm at a loss on how do this via a post request. Any advise would be greatly appreciated. Thanks. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org