Re: Using session object in JSP page

2009-05-12 Thread Lukasz Lenart
2009/5/11 NR031 nataraja...@cognizant.com:
 Map sesion=ActionContext.getContext().getSession();
 sesion.put(username,getUn());    /*getun() returns the username form field
 data*/

 I want to use this session data in all my JSP pages, how to use the session
 data in my JSP? I am using Struts -2 and NetBeans 6.1 IDE.

s:property value=#session.username/


Regards
-- 
Lukasz
http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Using session object in JSP page

2009-05-11 Thread Nils-Helge Garli Hegvik
That depends on how you want to use it. The tag reference should give
you the information you need.

http://struts.apache.org/2.1.6/docs/tag-developers-guide.html
http://struts.apache.org/2.1.6/docs/ognl.html
http://struts.apache.org/2.1.6/docs/tag-syntax.html

Nils-H

On Mon, May 11, 2009 at 7:57 AM, NR031 nataraja...@cognizant.com wrote:

 Hi,


   I am having a session object created in the execute method of my action
 class like this :

 Map sesion=ActionContext.getContext().getSession();
 sesion.put(username,getUn());    /*getun() returns the username form field
 data*/

 I want to use this session data in all my JSP pages, how to use the session
 data in my JSP? I am using Struts -2 and NetBeans 6.1 IDE.


 Thnaks in advance,


 --
 View this message in context: 
 http://www.nabble.com/Using-session-object-in-JSP-page-tp23477472p23477472.html
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Using session object in JSP page

2009-05-10 Thread NR031

Hi,


   I am having a session object created in the execute method of my action
class like this :

Map sesion=ActionContext.getContext().getSession();
sesion.put(username,getUn());/*getun() returns the username form field
data*/

I want to use this session data in all my JSP pages, how to use the session
data in my JSP? I am using Struts -2 and NetBeans 6.1 IDE.


Thnaks in advance,


-- 
View this message in context: 
http://www.nabble.com/Using-session-object-in-JSP-page-tp23477472p23477472.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org