facebook

Validation errors could not display (No error)

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #270132 Reply

    Hello guys,

    I found this tutorial for fom processing and validation

    http://www.devx.com/Java/Article/22134/1954?pf=true

    i go through it it looks fine it also worked but little mishap is there, when i insert wrong values it comes to form page again but didn’t display error messages.
    then i try to write System.out in validation conditions to verify either validation fires or not it works for System.out.println but didn’t display error on form

    errors.rejectValue(“username”, “error.login.invalid-user”,
    null, “Incorrect Username.”);

    i am unable to undersand might be messenges.properities file not found by this code but it also includes in classes folder.
    what may be wrong.

    summerise of error is validation is firing but could not print validation error on forms.

    thanks
    Faisal khan

    #270134 Reply

    also added in spring bean’s xml file

    <bean id=”messageSource” class=”org.springframework.context.support.ResourceBundleMessageSource”>
    <property name=”basename”><value>messages</value></property>
    </bean>

    #270137 Reply

    oh i wonder

    <%@ taglib prefix=”core” uri=”/WEB-INF/c-rt.tld” %>
    <%@ taglib prefix=”fmt” uri=”/WEB-INF/fmt-rt.tld” %>
    <%@ taglib prefix=”spring” uri=”/WEB-INF/spring.tld” %>

    <h1>
    Hello world<spring:message code=”error.login.not-specified”/>
    </h1>

    this code didn’t display anty thing in jsp, meant messages.properties files not found, any idea how to load property file manualy or how to fix this ?

    #270138 Reply

    here is my properties file which is in classes folder

    error.login.not-specified=User credentials not specified (try guest/guest).
    error.login.invalid-user=Username not valid, try ‘guest’
    error.login.invalid-pass=Password not valid, try ‘guest’
    error.trade.insufficient-funds=You do not have enough money to place this order
    error.trade.not-enough-shares=You do not have that many shares
    error.trade.dont-own=You don’t own this stock
    error.trade.invalid-symbol=Invalid ticker symbol: {0}

    #270145 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Validation errors could not display (No error)

You must be logged in to post in the forum log in