• 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

function "validate()" does not execute

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Guys::: PLease help me out....the function validate() is not executing, do not know why ???
Here are my files:::::::

LOGIN FORM


ACTION CLASS


STRUTS.XML FILE




and finally the,

MODEL CLASS




Control does not reach the execute function !!! and when I try to develop the same application without the model object "user", validation executes !!! Please help !!!
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"vaildate" <> "validate"
 
Ranch Hand
Posts: 72
Hibernate Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please check your User class.. is there any specific requirement that it should extend ActionSupport class?
I have not worked on Struts 2.. but i haven't seen anywhere one action class being instance variable of other..


 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Gopakumar Naryanan wrote:Please check your User class.. is there any specific requirement that it should extend ActionSupport class?



It is not required that a java bean extend ActionSupport. As a matter of fact, Struts 2 doesn't require an action to extend ActionSupport, though ActionSupport implements many useful methods.
As I pointed out in my previous post, Gopakumar misspelled the method name in his action. Struts will not automatically call the validate method in the User bean
 
Gopakumar Naryanan
Ranch Hand
Posts: 72
Hibernate Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.. i didn't notice the spelling mistake you specified.
 
reply
    Bookmark Topic Watch Topic
  • New Topic