Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

spring mvc validator

 
indu iyengar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

code for StudentLogin-servlet.xml


results in the exception

please help to solve this..
thanks
indu
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does your LoginValidator class extend Validator? (or implement, since it is an interface)
 
indu iyengar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 667
4
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..

 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may not care, but I prefer

(note the <?> in the method signature)
 
indu iyengar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all ,can anyone have an idea on this ? I strucked at this
thanks
indu
 
Prasad Krishnegowda
Ranch Hand
Posts: 667
4
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 667
4
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is compatible, just add commons-logging-1.1.jar to your applications WEB-INF/lib folder..
 
indu iyengar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Prasad... That exception has gone by adding commons-logging 1.1.1 jar ...

----------
indu
 
Prasad Krishnegowda
Ranch Hand
Posts: 667
4
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
indu iyengar wrote: thanks Prasad... That exception has gone by adding commons-logging 1.1.1 jar ...

----------
indu

You are Welcome..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic