File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

function "validate()" does not execute

 
Abhimanyus singh
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • 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 !!!
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"vaildate" <> "validate"
 
Gopakumar Naryanan
Ranch Hand
Posts: 72
Eclipse IDE Hibernate Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • 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: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • 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
Eclipse IDE Hibernate Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.. i didn't notice the spelling mistake you specified.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic