• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

spring validation problem

 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

i am getting the below error when i submit my form. Its not possible to understand the reason of the problem through stack trace.

Aug 19, 2009 4:05:09 PM org.springmodules.validation.commons.AbstractBeanValidat
or validate
SEVERE: Exception while validating object com.tutorial.mvc.User@1342545
org.apache.commons.validator.ValidatorException: org.springmodules.commons.valid
ator.FieldChecks at org.apache.commons.validator.ValidatorAction.loadValidationClass(ValidatorAction.java:646)
at org.apache.commons.validator.ValidatorAction.executeValidationMethod(ValidatorAction.java:555)
at org.apache.commons.validator.Field.validateForRule(Field.java:827)
at org.apache.commons.validator.Field.validate(Field.java:906)
at org.apache.commons.validator.Form.validate(Form.java:174)
at org.apache.commons.validator.Validator.validate(Validator.java:367)
at org.springmodules.validation.commons.AbstractBeanValidator.validate(AbstractBeanValidator.java:63)

i dont this its because of some missing jars otherwise i would have got exception during startup.
My jsp is as follows

<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<form:form commandName="user" action="/springmvc/login.htm" method="POST">
<spring:message code="first.name"></spring:message>
<form:input path="firstName"/>

<form:errors path="firstName"/>

<spring:message code="last.name"></spring:message>
<form:input path="lastName"/>

<form:errors path="lastName"/>

<input type="submit" value="Submit" />
</form:form>

validation xml is

<form-validation>
<formset>
<form name="user">
<field property="firstName" depends="required">
<arg0 key="required.firstName" />
</field>
<field property="lastName" depends="required">
<arg0 key="required.lastName" />
</field>
</form>
</formset>
</form-validation>

Please let me know if i am missing something here.

regards,
Ajse
 
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try to debug what happens at org.apache.commons.validator.ValidatorAction.loadValidationClass(ValidatorAction.java:646).
 
ajse ruku
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think i am not getting the java script code on my jsp. I am submitting a blank form and it should be checked on client side only.

 
ajse ruku
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can any body please let me know the process of including js in my jsp files as there is no HTML tag present in Spring. Struts uses HTML tag for including js functions in jsp.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic