• 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

can we have multiple validation.xml files to handle valdations of different forms?

 
Ranch Hand
Posts: 57
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi

can we have multiple validation.xml files to handle valdations of different forms?

I have written only one validation.xml, one formbean (ActionForm) to handle multiple jsp form elements. But when i use validation frame work all validations written in validation.xml are taking place irrespective of submitting JSP form elements.
so i need to validate only the elements submitted in jsp using this single validation.xml, is there any way to do it?

My code is as follows (Struts 1.2)

1)index.jsp


2)home.jsp


3)struts-config.xml


4) validation.xml





 
Ranch Hand
Posts: 94
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can make multiple validation.xml file depending on Action classes such e.g.

<actionClass>-<actionAlias>-validation.xml
yourActionClass-firstAction-validation.xml
yourActionClass-secondAction-validation.xml
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic