This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes Errors are not getting displayed on JSP when DynaValidatorActionForm is used. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Errors are not getting displayed on JSP when DynaValidatorActionForm is used. " Watch "Errors are not getting displayed on JSP when DynaValidatorActionForm is used. " New topic
Author

Errors are not getting displayed on JSP when DynaValidatorActionForm is used.

s manchika
Greenhorn

Joined: Jan 21, 2004
Posts: 5
here is my struts-config.xml

<form-bean name="ManageEditInfoForm" type="org.apache.struts.validator.DynaValidatorActionForm">
<form-property name="firstname" type="java.lang.String" initial=""/>
<form-property name="lastname" type="java.lang.String" initial=""/>
<form-property name="username" type="java.lang.String" initial=""/>
<form-property name="role" type="java.lang.String[]" initial=""/>
</form-bean>

<action

input="/pages/ManageNewUser.jsp"
name="ManageEditInfoForm"
path="/pages/mannewuser"
scope="request"
type="com.nbd.dynaaffiliatesite.ManageNewUserAction">

<forward name="noinfo" path="/pages/ManageNewUser.jsp" />
<forward name="success" path="/pages/manusers.do" />
<forward name="login" path="/pages/LoginForm.jsp" />
<forward name="error" path="/pages/Error.jsp" />

</action>

the validation.xml

<form name="/pages/mannewuser">
<field
property="firstname" depends="required,mask">
<arg0 key="loginform.firstname"/>
<var>
<var-name>mask</var-name>
<var-value>^[a-z A-Z]*$</var-value>
</var>
</field>
<field
property="lastname" depends="required,mask">
<arg0 key="loginform.lastname"/>
<var>
<var-name>mask</var-name>
<var-value>^[a-z A-Z]*$</var-value>
</var>
</field>
<field
property="username" depends="required,mask">
<arg0 key="loginform.username"/>
<var>
<var-name>mask</var-name>
<var-value>^[a-z A-Z]*$</var-value>
</var>
</field>
<field
property="role" depends="requiredArray">
<arg0 key="loginform.role"/>
</field>
</form>

In ManageNewUser.jsp i have <html:errors/> tag

Errors get display fine if i use ValidatorForm.
I am not understanding where i am doing wrong.
If any further details are needed,Please let me know.
I'll post them too.

i am using
Tomcat4.1.30
struts 1.1


Thanks in advance
 
 
subject: Errors are not getting displayed on JSP when DynaValidatorActionForm is used.