How to pass data from one Action class to another Action class?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to pass data from one Action class to another Action class?

Akash khare
first action class code
getRequest().setAttribute("RncPartnerID", model.getId());

2nd action class code
String rncPartnerId=(String)getRequest().getAttribute("RncPartnerID");
RncPartnerData rncPartnerData = new RncPartnerData();
rncPartnerData.setId(rncPartnerId);
rateCardData.setRncPartnerData(rncPartnerData



i am using this





Thanks and regards
Akash khare
Reply | Threaded
Open this post in threaded view
|

Re: How to pass data from one Action class to another Action class?

Hedju Hor
Hi,

redirect Action with parameters
    https://struts.apache.org/core-developers/redirect-action-result.html

or use Session
    https://struts.apache.org/getting-started/http-session.html

Regards
Hedju Hor

On 2018-01-06 08:03, Akash khare <[hidden email]> wrote:

> first action class code
> getRequest().setAttribute("RncPartnerID", model.getId());
>
> 2nd action class code
> String rncPartnerId=(String)getRequest().getAttribute("RncPartnerID");
> RncPartnerData rncPartnerData = new RncPartnerData();
> rncPartnerData.setId(rncPartnerId);
> rateCardData.setRncPartnerData(rncPartnerData
>
>
>
> i am using this
>
>
>
>
>
> Thanks and regards
> Akash khare
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]