This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 validation using Annotation is not working

 
Arun Giridharan
Ranch Hand
Posts: 290
Debian Fedora Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm doing validation for Name,but it seems there some problem (it's not working)

login.jsp


My Value Object has


struts.xml (piece of my struts.xml)



I really don't know what is the reason,why it's not validating

Thank You
 
kolipakula babu
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

In the Form you have to add Validation= "true" like below. Try this it will work.


<s:form action="AnnotationAction" method="POST" validate="true">

Regards,
Surendra
 
Arun Giridharan
Ranch Hand
Posts: 290
Debian Fedora Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i forgot to see , the Model validation :P

 
Arun Giridharan
Ranch Hand
Posts: 290
Debian Fedora Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So,how to validate a long value ?? ,i can't use


which give an TypeConversion error, so what can i do,i'm not getting it,how can i solve the issue.
 
Arun Giridharan
Ranch Hand
Posts: 290
Debian Fedora Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use Double , it's working fine!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic