aspose file tools*
The moose likes Struts and the fly likes problem in setting value of Field in action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem in setting value of Field in action" Watch "problem in setting value of Field in action" New topic
Author

problem in setting value of Field in action

subhasish nag
Ranch Hand

Joined: Apr 25, 2008
Posts: 101
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.

Thanks,<br />Subhasish
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1


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..


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
 
 
subject: problem in setting value of Field in action