Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
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
paul wheaton
Paul Clapham
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Liutauras Vilda
Saloon Keepers:
Tim Holloway
Carey Brown
Roland Mueller
Piet Souris
Bartenders:
Forum:
Struts
Dynavalidation doesn't seem to be working
Wilemr Le�n
Greenhorn
Posts: 2
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
I am trying t use Dynavalidation in a simple
test
form and it is not working, i.e., I don�t get any error or something similar BUT the App �jumps� the validation rules I have set. Here is the extract of my code.
I hope someone can help me
<!-- ========== Strunrs-config ========== <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> <struts-config> <!-- *********** Form Bean Definitions ******* --> <form-beans> <!-- ***************** LoginForm Form *************************************** --> <form-bean name="inputForm" type="org.apache.struts.validator.DynaValidatorForm"> <form-property name="userName" type="java.lang.String" initial=""/> </form-bean> </form-beans> <!-- ========== Action Mapping Definitions ===== --> <action-mappings> <!-- ============== ReloadPPCForm Action ============== --> <action name="inputForm" input="/input.jsp" path="/inputSubmit" scope="request" type="test.InputAction" validate="true"> <forward name="success" path="/home.jsp" /> <forward name="failure" path="/inputForm"/> </action> </action-mappings> <!-- ========== Message Resources Definitions ===== --> <message-resources null="true" parameter="test.ApplicationResources"/> <!-- ========== Plug-ins Definitions =============== --> <plug-in className="org.apache.struts.validator.ValidatorPlugIn"> <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/> <set-property property="stopOnFirstError" value="true" /> </plug-in> </struts-config> <!-- ========== validation.xml ========== <form-validation> <formset> <form name="inputForm"> <field property="userName" depends="required,email"> <arg0 key="error.inputForm.userName"/> </field> </form> </formset> </form-validation> <!-- ============== input.jsp ============== <%@page language="java" pageEncoding="ISO-8859-1"%> <%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> <%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> <%@taglib uri="/WEB-INF/struts-nested.tld" prefix="nested"%> <%@taglib uri="/WEB-INF/struts-template.tld" prefix="template"%> <%@taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <body> <html:form action="inputSubmit"> <table> <tr> <td align="left"> <tr> <td align="right"> <bean:message key="login.email"/> </td> <td align="left"> <html:text property="userName" size="15" maxlength="25" /> </td> </tr> <tr> <td colspan="2" align="right"> <html:errors property="userName" /> </td> </tr> <tr> <td> <html:submit value="Enviar"/> </td> </tr> </table> </html:form> </body> </html>
Wilemr Le�n
Greenhorn
Posts: 2
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
�Anybody here?
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
why does my application not perform server side validations?
hi
confusion in valiadtion.xml
Unable to find setter method for attribute: locale
Form is not being validated
More...