This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Struts and the fly likes validation.xml file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "validation.xml file" Watch "validation.xml file" New topic

validation.xml file

sha ram

Joined: Nov 25, 2003
Posts: 12
I could not find validation.xml under the web-inf directory. Please help me . How should I get this file? I work on websphere studio 5.0
poornima balagopal
Ranch Hand

Joined: Dec 02, 2003
Posts: 83
When you download struts 1.1 from the jakarta site you will get both
validation-rules.xml(dtd also) file and validation_1_1.dtd file Since validation.xml file is the application specific i think we have to create the file and plug into the config file
Here is a simple example for validation.xml file
<constant-value>^\(? (\d{3}\)?[-| ]?(\d{4}$</constant-value>
<form name="chkoutForm">
<field property="phone"
depends="required, mask">
<msg name="mask" key="phone.invalidFormat"/>
<arg0 key="registrationForm.firstname.displayname"/>
Configure the corresonding DTD file into this
If you have any doubt just go through jakarta.apache .org site. it is very useful .
All the best try this
Rick Hightower
Ranch Hand

Joined: Feb 20, 2002
Posts: 350
In the struts install directory. Look for a directory called webapps. In web apps there is a starter war file called blank.war. Blank.war has the files you want under WEB-INF.

Rick Hightower is CTO of Mammatus which focuses on Cloud Computing, EC2, etc. Rick is invovled in Java CDI and Java EE as well. linkedin,twitter,blog
It is sorta covered in the JavaRanch Style Guide.
subject: validation.xml file
It's not a secret anymore!