Some more information on your config files and action code would be helpful.

Make sure that in your <action> definition in the struts-config.xml you have 
validate="true" also make sure that your Form bean extends ValidatorForm and that in 
your validate() method you call super.validate() to process all validations that are 
in your validation.xml file.

HTH

-Devin



-----Original Message-----
From: Richard Mixon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 20, 2002 12:16 AM
To: [EMAIL PROTECTED]
Subject: Enabling server-side (only) validation with Struts 1.1 


I must not be understanding how to set this up right.

I can configure validator fine so that I get client-side (JavaScript)
validation. Required fields and email validation work just fine.

But I want to turn off client-side and just use server-side (at least for
now).

To do this all I did was remove the 'onsubmit="return
validateContactForm(this);"' from my form statement. I left in the following
two tags at the bottom of my JSP form:
<html:javascript formName="contactForm" dynamicJavascript="true"
staticJavascript="false"/>
<script language="Javascript1.1" src="staticJavascript.jsp"></script>

Now, when I submit the form the URL address bar changes to
"http://rth.swamp.com/contacts/saveContact.do"; and I get a blank page with
"Done" in the status bar at the bottom. I've left off a required field so I
expect to have the JSP page re-displayed.

What should I be doing differently?


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to