• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts and Validation Framework

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Never Mind Issue is solved. Thanks.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic