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

Getting ActionForm values from Java class

 
Bloo Barton
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I need to get a value into a Java class from an ActionForm I generally just pass it in from my Action class. Since the Action class is always passed in the ActionForm item mapped to the action class I can easily get grab my desired value and pass it along.

Now though I am calling a class from an Action class, but I want to pass in another variable that is residing in an unrelated form that is session scoped. I need this value since it is required by a stored procedure for security validation.

How can I get an arbitrary session variable's value like this?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34422
347
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bloo,

This gets you an arbitrary form from the session. Then name to pass in is whatever you used in the struts config file.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic