It's not a secret anymore!
The moose likes Struts and the fly likes mapping.setInput() - - - - - help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "mapping.setInput() - - - - - help!" Watch "mapping.setInput() - - - - - help!" New topic

mapping.setInput() - - - - - help!

satish rn

Joined: Mar 12, 2004
Posts: 11
I am trying to change the input jsp page of my action mapping in the validate method of my form bean using mapping.setInput() method.
Then, I get a "Configuration is frozen " error message. Can anyone tell me how i can dynamically change the input for my action mapping during validation.
This is because i have my application designed like this. I have to make user input across 4 input forms. All these 4 input forms share the same form bean. The fields which are not input in a particular form are as hidden fields. form1 calls action2 to load form2. form2 can call action1 to load form1 or action3 to load form3. form3 calls action2 to get form 2 and action4 to call form4.
Now, my problem is this. when i am in form2, and i call action3, my input is form2 and if validation fails, form2 has to display errors. so in my action mapping for action3, if i specify form2 as my input, then if i call action3 from form4, my input is being taken as form2 instead of form4. so i have a hidden field telling which form i am in, and wanted to set the input field of the mapping dynamically in the validate method. This leads to the above error.
can anyone offer me a solution to this problem telling me how can i overcome this problem.

Thank you very much,
I agree. Here's the link:
subject: mapping.setInput() - - - - - help!
jQuery in Action, 3rd edition