I ended up solving the problem using an Interceptor and saving the parameter
Map to the session.
session.setAttribute("input_params", request.getParameterMap();
Then in my action I implemented SessionAware and utililized BeanUtils from
Jakarta Commons to re-populate the properties in my action class.
this.setRequestMap((Map)this.getSession().get("input_parms"));
BeanUtils.populate(this, this.getRequestMap();
Thank you for your help.
David
Laurie Harper wrote:
>
> daveck wrote:
>> Hello,
>> I need to put up a "Confirmation Screen" in between my input jsp and my
>> success jsp.
>>
>> byproduct.action -> byproduct-input.jsp
>> byproduct-input.jsp -> confirm.jsp
>> (If yes...)
>> confirm.jsp -> byproduct.action
>> byproduct.action -> byproduct-success.action
>>
>> Is there a Struts 2 way to carry the input parameters across the
>> confirm.jsp
>> so the second call to byproduct.action has access to them?
>>
>> I've looked at the ChainInterceptor and ActionChaining and have a feeling
>> the solution resides there, but could use a little help. I hope I was
>> clear
>> enough... :)
>>
>> Thanks!
>
> The short answer is no, not without intervention from you. You will need
> to arrange yourself for the data submitted from byproduct-input.jsp to
> be carried over so that it's available to byproduct.action.
>
> Two ways to do that are:
>
> 1) place an action between byproduct-input.jsp and confirm.jsp which
> saves the submitted data into an object stored in the session, then
> retrieve that object in byproduct-success.action
>
> 2) place hidden fields in confirm.jsp that correspond to the inputs in
> byproduct-input.jsp, populating them from the request parameters. Make
> sure that confirm.jsp calls byproduct.action using a form submit (not
> just a link) so that the data in the hidden inputs gets sent.
>
> You should probably be submitting byproduct-input.jsp to an action
> anyway, so that you can perform validation and/or expose any additional
> data that confirm.jsp might need but, other than that, the main thing
> affecting which approach you choose is whether you want to use or avoid
> the session.
>
> HTH,
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Newbie-to-Struts-2---Question-about-Interceptors-tp15230274p15231887.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]