Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can session's data be accessed in ActionForms ?

 
Anand Gondhiya
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I use sruts 1.1. is there anyway you can access session variables in the ActionForms ?
thanks
-Anand.
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depends what you're talking about: validate gets passed a HttpServletRequest, so request.getSession() would obviously give you access to the HTTPSession.
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The reset method also has request. It is possible to have a local variable on the ActionForm to hold request or session which would get set in the reset method. That said, I reeeeeeally don't recommend it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic