Thanks - I checked that validate="true", I'm extending ValidatorForm and I
do not have a validate method in my form bean (so super.validate() should be
used).
In standard error, I can see that the POST is acknoledged, then I see two
displays from my formbean and then nothing:
 Nov 20, 2002 8:45:28 AM org.apache.struts.action.RequestProcessor process
 INFO: Processing a 'POST' for path '/saveContact'
 ContactForm: setEmailAddress
 ContactForm: setFirstName

Here's the guts of my struts config:
  <form-beans>
    <!-- Contact form bean -->
    <form-bean      name="contactForm"
                    type="com.rth.webapp.contacts.ContactForm"/>
  </form-beans>
  <global-forwards>
    <forward   name="contact"         path="/ContactUs.jsp"/>
    <forward   name="success"         path="/logonSucceeded.jsp"/>
    <forward   name="failure"         path="/logonFailed.jsp"/>
  </global-forwards>
  <action-mappings>
    <action    path="/saveContact"
               type="com.rth.webapp.contacts.SaveContactAction"
               name="contactForm"
              scope="request"
              input="/ContactUs.jsp"
           validate="true">
      <forward name="success"              path="/logonSucceeded.jsp"/>
      <forward name="failure"              path="/logonFailed.jsp"/>
    </action>
  </action-mappings>

But if I put the ' onsubmit="return validateContactForm(this);" back in the
form statement everything works fine - except I have the client-side
validations back in the picture.

Thanks in advance - Richard

-----Original Message-----
From: Richards, Devin N (Devin) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 20, 2002 7:30 AM
To: Struts Users Mailing List
Subject: RE: Enabling server-side (only) validation with Struts 1.1


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]>



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

Reply via email to