• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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
 
My pie came with a little toothpic holding up this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic