You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Koni Roth <ko...@bluewin.ch> on 2003/08/01 22:01:09 UTC
Validator newbie - server side dynamic validation ??
Hi list
I'm using the validation framework that comes with Struts 1.1. Client
side validation with JavaScript works fine. I read the manuals and the
'Struts in Action' book but somehow I still do not understand how
dynamic (automatic?) validation server side works! What exactly do I
have to set in my LogonAction and struts-config?? Here my settings:
validation.xml:
---------------
<form name="LogonForm">
<field property="logon_name"
depends="required">
<arg0 key="prompt.logon.username"/>
</field>
<field property="password"
depends="required">
<arg0 key="prompt.logon.password"/>
</field>
</form>
login.jsp:
----------
....
<html:errors />
....
<html:javascript formName="LogonForm"
dynamicJavascript="true"
staticJavascript="false"/>
<script language="Javascript1.1" src="/staticJavascript.jsp"></script>
struts-config.xml:
------------------
<action path="/user/login"
type="ch.rothweb.user.LogonAction"
name="LogonForm"
parameter="method"
scope="request"
validate="false"
input="/user/login.jsp">
LogonAction.java:
-----------------
?????????
?????????
When I set 'validate="true"' in struts-config.xml my login.jsp comes
blank (white). What do I have to write in LogonAction.java ????? Do I
have to call a validate() method or what ??
Thanks for any suggestions and examples.
Koni
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org