Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts validation framework

 
zohreh talebi
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dears,

when i start using validation framework i encounter with this error .

javax.servlet.UnavailableException : Cannot load a validator resource from '/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml'

INFO: Servlet action is currently unavailable

this error just occures when i use validation frame work .

what should i do ?

thanks

Zohreh
 
Mark Manns
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
did you enable validation? you have to add this to the struts-config.xml file so struts can find the validation xml files:

<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/WEB-INF/validator-rules.xml,
/WEB-INF/validation.xml"/>
</plug-in>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic