You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by r2d2onsteroids <ro...@r2d2-goes-mental.tmfweb.nl> on 2002/07/08 11:45:02 UTC

ActionError() question

Hello,

I have a question regarding the ActionError method.

When I have a form used for creating a new user, I can use the 
ActionErrors method in the UserForm class for validating the inserted 
values for this new user. The UserAction class then actually creates 
a new user with the values specified, and creates a new User bean 
(this bean does not exist at the time the values for this new user 
are entered). This works flawlessly.
However, when I want to edit the values for an existing user, I have 
a form with input fields populated by a User bean. When I want to 
validate the values entered for this existing user, I can validate 
these values, and on error it returns to my jsp form page. But at 
this time, no User bean has been instantiated:

   javax.servlet.ServletException: Cannot find bean User in scope null

I can understand this message since the validation takes place in the 
UserForm class opposed to the UserAction class, and no User bean has 
been instantiated yet. 
Am I something missing here or am I taking the wrong approach?

Any help would be greatly appreciated!

With kind regards,

Robin van het Hof
Netherlands Board of Tourism


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>