This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes ActionDispatcher and Validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ActionDispatcher and Validation" Watch "ActionDispatcher and Validation" New topic
Author

ActionDispatcher and Validation

Henry Lowell
Ranch Hand

Joined: May 29, 2006
Posts: 63
I am using ActionDispatcher and EventActionDispatcher for my Action classes. For whatever reason, when I do this, the form is trying to be validated the initial time the JSP is being rendered. Because of this, it goes into a validation loop and throws a StackOverflow. If anyone knows why this is happening, it would be much appreciated.

Thanks. Here is the code.

AddUserAction.java


struts-config


Hank
Dom Lassy
Ranch Hand

Joined: May 05, 2006
Posts: 181
Are you initially calling /AddUser.do? If so, it is performing validation because validate is set to true. I don't use dispatcher that often, but I think you would want one action to load the page (with validate="false") and use the dispatcher for the submittal (add, edit, etc..) and validate="true".
Henry Lowell
Ranch Hand

Joined: May 29, 2006
Posts: 63
Tha's what I've done to get past the issue. I am assuming this is the only way if using auto validation?
 
jQuery in Action, 2nd edition
 
subject: ActionDispatcher and Validation