• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

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

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Just let me do the talking. Ahem ... so ... you see ... we have this tiny ad...
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic