- This topic has 4 replies, 2 voices, and was last updated 18 years, 2 months ago by
Riyad Kalla.
-
AuthorPosts
-
Muhammad FAisalMemberHello 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 formerrors.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 khanMay 16, 2007 at 4:23 am #270134
Muhammad FAisalMemberalso added in spring bean’s xml file
<bean id=”messageSource” class=”org.springframework.context.support.ResourceBundleMessageSource”>
<property name=”basename”><value>messages</value></property>
</bean>May 16, 2007 at 6:07 am #270137
Muhammad FAisalMemberoh 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 ?
May 16, 2007 at 6:08 am #270138
Muhammad FAisalMemberhere 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}May 16, 2007 at 9:29 am #270145
Riyad KallaMemberMoving to OT > Soft Dev
-
AuthorPosts