Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleSetting a default Result Type
public Result runAction() {
	ServletDispatcherResult result = new ServletDispatcherResult();
	result.setLocation("input-form.jsp");
	return result;
}
<result-types>
   <result-type name="dispatcher" default="true"
                class="org.apache.struts2.dispatcher.ServletDispatcherResult" />
</result-types>

If a type attribute is not specified, the framework will use the default dispatcher type, which forwards to another web resource. If the resource is a JavaServer Page, then the container will render it, using its JSP engine.

...