Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts2 execute return workflow

 
huali ouyang
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In each xxxAction.java, the work flow may like below.

My question is why even there is exception occurring, and it is in catch block, but the method still goes to perform the line of return "SUCCESS". Hence, if you do not define return String in catch block, it always execute the return "SUCCESS", and forward to SUCCESS page that has uncompleted information.

I am kind of confused, is it supposed to stop in catch block? and the system can not reach the line of return "SUCCESS"? Anyone can help me on this topic?
Looks like it's not necessary to define return FAILURE in catch block.

Thanks a lot in advance.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would processing stop in a catch block?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic