This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Spring and the fly likes spring mvc validator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "spring mvc validator" Watch "spring mvc validator" New topic
Author

spring mvc validator

indu iyengar
Ranch Hand

Joined: Jul 30, 2010
Posts: 115
hi all,

code for StudentLogin-servlet.xml


results in the exception

please help to solve this..
thanks
indu


thanks ,
Indu
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Does your LoginValidator class extend Validator? (or implement, since it is an interface)
indu iyengar
Ranch Hand

Joined: Jul 30, 2010
Posts: 115
thanks for your reply,
yes, my loginvalidator implements validator by implementing supports() and validate() methods..





why am getting these type of erros ?

code in my StudentLogin-servlet.xml

please any one have an idea ?please help me..
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 507

In your StudentLogin-servlet.xml, the below part


should be changed to



Since, MessageSource is an interface not a class, and ResourceBundleMessageSource is a class..


Regards, Prasad
SCJP 5 (93%)
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

You may not care, but I prefer

(note the <?> in the method signature)
indu iyengar
Ranch Hand

Joined: Jul 30, 2010
Posts: 115
thanks for your quick reply..
I changed as you said
now it shows the exception as ...

oh! sorry David, just now I saw your reply.. when I change as you said , it is not accepting ..its showing the error as "NameClash"

indu iyengar
Ranch Hand

Joined: Jul 30, 2010
Posts: 115
Hi all ,can anyone have an idea on this ? I strucked at this
thanks
indu
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 507

indu iyengar wrote:
now it shows the exception as ...

This exception is because, you are having the wrong version of commons-logging.jar in your classpath..

oh! sorry David, just now I saw your reply.. when I change as you said , it is not accepting ..its showing the error as "NameClash"



Can you please elaborate on this? like it is an error or an exception, In which line of the code, error is coming up..
indu iyengar
Ranch Hand

Joined: Jul 30, 2010
Posts: 115
Hi Prasad thanks for reply,
am using JBoss 5.1 with Spring 2.5 . Is it compatible ? I didnt add add commons-logging.jar in Jboss library...
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 507

It is compatible, just add commons-logging-1.1.jar to your applications WEB-INF/lib folder..
indu iyengar
Ranch Hand

Joined: Jul 30, 2010
Posts: 115
thanks Prasad... That exception has gone by adding commons-logging 1.1.1 jar ...

----------
indu
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 507

indu iyengar wrote: thanks Prasad... That exception has gone by adding commons-logging 1.1.1 jar ...

----------
indu

You are Welcome..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: spring mvc validator
 
Similar Threads
POrtlet with spring
Spring + JPA + Hibernate and multiple Database connection
inject into application listener?
Sun App Server PE 9 and Hibernate
Portlet with Spring