...
Result Type | name | class |
---|---|---|
dispatcher | com.opensymphony.webwork.dispatcher.ServletDispatcherResult | |
redirect | com.opensymphony.webwork.dispatcher.ServletRedirectResult | |
chain | com.opensymphony.xwork.ActionChainResult | |
velocity | com.opensymphony.webwork.dispatcher.VelocityResult | |
freemarker | com.opensymphony.webwork.views.freemarker.FreemarkerResult | |
jasper | com.opensymphony.webwork.views.jasperreports.JasperReportsResult | |
xslt | com.opensymphony.webwork.views.xslt.XSLTResult | |
| 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 | ||||
---|---|---|---|---|
|
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 |