• 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

Form Validation using action-validation.xml file

 
Ranch Hand
Posts: 78
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am trying for days to validate my form using validation framework of struts, I am not able to figure out the problem. I have seen many posts. Did as they say. But all in vain. Not able to validate. Please help me figure out the problem in my code.
I have a login form that needs to be validated. I am new to struts. So this is just a test program.


login.jsp




LoginAction.java



LoginAction-validation.xml



struts.xml



Any help will be appreciated. No error message is displayed.
 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jas,

The problem is I think while calling action in login.jsp.

Use, <s:form action="login" method="post" validate="true"> instead of action= "login.action". This might work.

Thanks and Regards,
Ashwini Kashyap | akashyap@infocepts.com | www.infocepts.com

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic