• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Struts2 validation using annotaions for Model Driven

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am trying to validate a username and password in a model by implemented that class in Action as Model Driven.

validation usign annotations are not working???

Can any one please help me??

If I am passing the validation directly under action class everything works fine but i want the validation using ModelDriven.

Thanks in advance
sarada.
 
sarada srinivas
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have followed these steps to proceed further but still unsucessfull.

Added init param in web.xml
1) <init-param>
<param-name>actionPackage</param-name>
<param-value>com.vaanila.action</param-value>
</init-param>

2)<s:form action="welcome" validate="true">
<s:fielderror />
<s:textfield name="userName" label="User Name" />
<s:submit />
</s:form>

3) Action class


I am geting the Error but not on the form but on the server console


SEVERE: Validation error for userName:Name required



Can some please findout what I am missing to display the error on the form???
 
sarada srinivas
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am still having this issue.

Can anyone help me please....

Thanks,
sarada
 
Too many men are afraid of being fools - Henry Ford. Foolish tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic