• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic