File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts and Validation Framework Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Struts and Validation Framework" Watch "Struts and Validation Framework" New topic
Author

Struts and Validation Framework

chris hart
Greenhorn

Joined: Oct 09, 2003
Posts: 9
Hello.
I am using the validator framework with my struts application. I have the client side javascript validation working but am having an issue with the server side validation
It boils down to this. When I declare my form to be
public class LoginForm extends ValidationActionForm instead of
public class LoginForm extends ActionForm I receive a class cast exception in my Action Class. This is due to the Action class' method execute wants an ActionForm not a ValidationActionForm. How do I get around this? Thanks.
chris hart
Greenhorn

Joined: Oct 09, 2003
Posts: 9
Never Mind Issue is solved. Thanks.
archana kaul
Greenhorn

Joined: Oct 01, 2003
Posts: 5
Hi chris
I am also working in the struts. I am new to strutrs framework. I want to do client side validation. I have declared the fields and validatins requried for the fields in the validatin.xml. I am extending the
ValidatorActionForm for my formbean.
When I run the form by not entering anything in the form and press submit sutton, it is forwarding to failure page and it is not showing the required message.
What should I do to enable to client side validation. I have not written any javascript method in validator-rules.xml. All I am doing is defininf the errors.required in my application resources file. I am expecting a error message when I keep the text box blank. Can you please tell me what are the steps I need to follow to enable the validation.
Thanks,
archana
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Struts and Validation Framework
 
Similar Threads
STRUTS VALIDATOR FRAMEWORK
why is my loginForm stopped processing the user input
Another "Validator Plugin" Problem
problem in Struts Validation
Can anyone please help me out?