struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From enthucoder <>
Subject Re: [S1] Best practice to transfer control to next page (out of JVM)?
Date Tue, 22 Jan 2008 15:56:59 GMT

Can  you give some pointers on how do i contruct a HTTP POST Message in my
Action and redirect the page to remote resource (non J2EE App)..?

Laurie Harper wrote:
> enthucoder wrote:
>> Hi,
>> Please bear with me, incase this turns out to be a dumb question.
>> I want to transfer control to a non JSP page after I hit submit. Apart
>> from
>> this I am also sending some data as a HTTPS POST. In case of using
>> response.sendRedirect(), it doesn't take care of the POST data.
>> So, can anybody help me with what's the best practice in sending POST
>> request from a Struts based J2EE application to another page (which is
>> not a
>> J2EE Application)
> I'm not sure I'm clear on what you want to accomplish. If you want to 
> post a form to a page at a different URL outside your application, just 
> use that URL as the form's action. Your Struts application needn't be 
> involved at all.
> If the intention is to submit a form and have it processed by *both* 
> your Struts app *and* an external resource, things are a little 
> trickier. In that case, your Struts action would have to construct a new 
> HTTP POST request using the request parameters it received from the 
> browser. Your action would then handle sending the request to the remote 
> resource (and streaming the response back to the browser if required), 
> acting as a kind of pseudo-proxy.
> Perhaps you could explain what your overall objective is; perhaps this 
> isn't the right approach to take to the problem.
> L.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message