struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Looking for a tutorial or complete example of using DynaValidatorForm
Date Sun, 09 Apr 2006 03:09:52 GMT

I have been using Struts for awhile but it was a very old (1.02) version.
Just finished upgrading my apps to Struts 1.2.7 and would like to take
advantage of the DynaValidatorForm.

I've found several articles on it and many examples. However, I haven't
found one that includes a complete example app and I am having trouble
getting it to work properly with the pieces I have.

Basically, what I want to do is create the form dynamically in the
struts-config.xml file, define the error messages in a properties file and
define the validations in a validator.xml file.

Here is what I have so far. When I try to to run my "dyna.jsp" I get a
"javax.servlet.jsp.JspException: null" error. I'v'e put breakpoints in my
action class but it never gets that far.

Any help would be greatly appreciated.

 <form-bean name="dynaForm"
    <form-property name="customer" type="java.lang.String"/>
    <form-property name="email" type="java.lang.String"/>
  <action path="/dynaTest" type="com.firstenergycorp.dzp.DynaTester"
    <forward name="/success" path="/thank_you.html"/>
<message-resources parameter="application"/>
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
  <set-property property="pathnames"

    <display-name>WEB APP</display-name>
    <description>WEB APP description</description>

<form name="dynaForm">
  <field property="customer" depends="required">
    <msg name="required" key="error.customer"/>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<html:form action = "/dynaTest">
Customer Name:*<html:text property="customer" /><br><br>
      email:*<html:text property="email" /><br><br>

The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If
the reader of this message is not the intended recipient or an
agent responsible for delivering it to the intended recipient, you
are hereby notified that you have received this document in error
and that any review, dissemination, distribution, or copying of
this message is strictly prohibited. If you have received this
communication in error, please notify us immediately, and delete
the original message.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message