Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Struts and the fly likes A question on <result> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "A question on <result>" Watch "A question on <result>" New topic

A question on <result>

Thomas Kennedy
Ranch Hand

Joined: Jan 20, 2008
Posts: 137
Kerniawan's Struts 2 Design and Programming has a snippet on page 47 as follows:

1. Is it correct to say that the second <result> will be used for all return values other than "input"?

2. It is correct to say that the <global-results> element, if there is one, will never be consulted?

Costs matter. Justice lies in processes not outcomes. Crime is caused by criminals.
David Newton

Joined: Sep 29, 2008
Posts: 12617

1) No. The default result name is "success", and it will be used by anything returning "success", but nothing else.
2) No. Why wouldn't it be?
It is sorta covered in the JavaRanch Style Guide.
subject: A question on <result>
Similar Threads
Forwarding data struts.xml
Struts2 Action Mapping Problem - No configuration found for the specified action
Struts 2 struts.xml not redirecting
Struts2: which result type to use
Issue with Struts 2 Dispatcher Result