Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

validate() and execute()

 
Abhi Agar
Greenhorn
Posts: 26
Java MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My question is: what runs first in a struts action class which extends ActionSupport - execute() or validate()?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depends on your interceptor stack--validate() only runs if you have the validation interceptor.

It wouldn't make any sense to run execute() *before* validation, though, would it, since the workflow interceptor determines which result should be returned on a validation interceptor.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic