Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in setting value of Field in action

 
subhasish nag
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,
I have a problem in in setting value of Field (A)in action.Here there is a jsp and two consecutive action. The first action (action1) setting one value of the jsp field and forwards it to another action(action2).But when the second action(action2) is loaded the value of that field(A) set to as per jsp value.(setter method of formbean again called). How can I avoid this situation so that the after setting the field value in first action ,the value of field should not be changed again.
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I suppose "Field" value , means a Form field (property) value, If that's correct, then I suggest to keep that form in session scope and remove any setting of that form from second consecutive action, by modifying it action mapping in struts-config.xml.

If that's not clear to you , than please post the JSP, two action class with there action mapping..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic