Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts

 
Satya Dasari
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am beginner in struts.I am trying to store values in a session.anybody pls help
Thanks
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34375
345
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Satya,
Welcome to JavaRanch!

Every Struts action has the HttpRequest passed in the execute method. You can use request.getSession() to get the session.
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The preferred method is to implement SessionAware interface. For more details, please refer to this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic