This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes problem with validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem with validation" Watch "problem with validation" New topic
Author

problem with validation

Eric Sexton
Ranch Hand

Joined: Sep 12, 2003
Posts: 133
I have the following action mapped in my struts config


First off, with validate set to "false", why does this still get submitted to validation? When I try to set it to "true", it kills the app server altogether. Anyhow, my goal is to get validation and when I get an error, I want to forward to another action that is slightly different then my original action. Right now when the validation occurs, the 'input' parameter is ignored and the 'path' is the action that gets called. Any suggestions?
Srikanth Shenoy
author
Ranch Hand

Joined: Jan 24, 2004
Posts: 184
Just a guess
Your input="/do/secure/searchNoPrepopulate" might be resulting in infinite loop resulting in app server crash.
Another weird thing is that the forward starts with @ rather than /.
Srikanth
Author: Struts Survival Guide


Srikanth Shenoy
Author of Struts Survival Guide : Basics to Best Practices
Eric Sexton
Ranch Hand

Joined: Sep 12, 2003
Posts: 133
But shouldn't the 'validate=false' be stopping it from validating? Why does it still validate?
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

The action TYPE attribute should be the fully qualified class name of your ACTION, not your formbean.
Don't forget to map your formbean in a form-bean tag - that is where the TYPE attribute is the fully qualified class name of the formbean.


A good workman is known by his tools.
Srikanth Shenoy
author
Ranch Hand

Joined: Jan 24, 2004
Posts: 184
Good catch Marc...
Srikanth
Emilio Butrage´┐Żo
Greenhorn

Joined: Mar 05, 2004
Posts: 8
Eric -
Do what the previous posters have suggested, and if that does not work, look at how you are invoking the action class.
I use WSAD and have not seen those problems. Good luck
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with validation
 
Similar Threads
Validation and HttpSession
Struts Cancel Button submits the form
SSLEXT and Struts 1.2.9
Problem with validator
any idea please