on 11-25-2007 9:07 PM
We are doing some custom development for ISA r3(webshop)
I have some data in the file order.jsp.
How do i store this data in session so that I can pass it across to different screens
and display it on the ordersimulate.jsp page.
Do i need to modify the struts action classes or is there a direct way in which i can
store the information in session and retreive the same on subsequent JSP page?
Any information/code snippet is appreciated.
Hi Stride,
You can store the data in the userSessionData object. This scope of this object is session, so you can easily transfer the data between classes and jsp's.
To get this object, you can add the code as:
UserSessionData userSessionData = UserSessionData.getUserSessionData(pageContext.getSession());
To store the information use;
userSessionData.setAttribute("attrib_name","test");
To retrieve the information use:
String name = userSessionData.getAttribute("attrib_name");
Hope this will resolve your query.
Regards,
Prashil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.