Versions Compared

Key

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

...

Result Type

name

class

#Dispatcher

dispatcher

com.opensymphony.webwork.dispatcher.ServletDispatcherResult

#Redirect

redirect

com.opensymphony.webwork.dispatcher.ServletRedirectResult

#Action Chaining

chain

com.opensymphony.xwork.ActionChainResult

#Velocity

velocity

com.opensymphony.webwork.dispatcher.VelocityResult

#FreeMarker

freemarker

com.opensymphony.webwork.views.freemarker.FreemarkerResult

#JasperReports

jasper

com.opensymphony.webwork.views.jasperreports.JasperReportsResult

#XML/XSL

xslt

com.opensymphony.webwork.views.xslt.XSLTResult

#HttpHeaderResult

 

com.opensymphony.webwork.dispatcher.HttpHeaderResult

Results are specified in a xwork xml config file(xwork.xml) nested inside <action>. If the location param is the only param being specified in the result tag, you can simplify it as follows:

...

Code Block
<action name="bar" class="myPackage.barAction">
  <result name="success" type="dispatcher">foo.jsp</result>
</action>


NOTE:The Parse attribute enables the location element to be parsed for expressions. An example of how this could be useful:

Code Block

<result name="success" type="redirect">/displayCart.action?userId=${userId}</result>


NOTE: You can also specify global-results to use with multiple actions. This can save time from having to add the same result to many different actions. For more information on result tags and global-results, see Results and global-results

...

Code Block
<result name="success" type="xslt">foo.xslt</result>


HttpHeaderResult
Anchor
HttpHeaderResult
HttpHeaderResult


A custom Result type for evaluating HTTP headers against the ValueStack.

Parameters

Required

Description

status

no

the http servlet response status code that should be set on a response

parse

no

true by default. If set to false, the location param will not be parsed for Ognl expressions