Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

in struts2 how can I use session variables

 
Ar Reddy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in struts2 how can I use session variables
 
debraj mallick
Ranch Hand
Posts: 188
Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi reddy,

you can use
 
Ar Reddy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.
If I want to use in jsp page how can I use it.. while editing a page need to display before entered values in that session. pLease provide me a sample in strtus 2.
Thanks,
Arpitha.
 
debraj mallick
Ranch Hand
Posts: 188
Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Arpitha,

I didn't understand what you are looking for, here are some link,
http://struts.apache.org/2.0.14/docs/simplelogin-with-session.html
do not use scriplets in your jsp page. To retrieve context, application, session, request scope object use the following url
http://struts.apache.org/2.0.8/docs/jsp.html

hope you find these useful.
 
Satabdi Bhattacharjee
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here you set value in session ...its ok.

now get value in jsp...
getAttribute("string");

ok.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic