You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Richard Mixon <rn...@custco.biz> on 2002/11/20 06:16:08 UTC

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?