THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
<result-types>
<result-type name="dispatcher" class="com.opensymphony.webwork.dispatcher.ServletDispatcherResult" default="true"/>
<result-type name="redirect" class="com.opensymphony.webwork.dispatcher.ServletRedirectResult"/>
<result-type name="velocity" class="com.opensymphony.webwork.dispatcher.VelocityResult"/>
<result-type name="chain" class="com.opensymphony.xwork.ActionChainResult"/>
<result-type name="xslt" class="com.opensymphony.webwork.views.xslt.XSLTResult"/>
<result-type name="jasper" class="com.opensymphony.webwork.views.jasperreports.JasperReportsResult"/>
<result-type name="freemarker" class="com.opensymphony.webwork.views.freemarker.FreemarkerResult"/>
<result-type name="httpheader" class="com.opensymphony.webwork.dispatcher.HttpHeaderResult"/>
<result-type name="stream" class="com.opensymphony.webwork.dispatcher.StreamResult"/>
<result-type name="plaintext" class="com.opensymphony.webwork.dispatcher.PlainTextResult" />
</result-types>
...
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<include file="webwork-default.xml"/> <package name="myPackage" extends="default"> <action name="bar" class="myPackage.barAction"> <!-- default result type is "dispatcher" --> <!-- default result name is "success" --> <result>foo.jsp</result> <result name="error">error.jsp</result> </result> </action> </package> |
...
- Chain Result - used for Action Chaining
- Dispatcher Result - used for JSP integration
- FreeMarker Result - used for FreeMarker integration
- HttpHeader Result - used to control special HTTP behaviors
- JasperReports Result - used for JasperReports integration
- Redirect Result - used to redirect to another URL
- Redirect Action Result - used to redirect to another action
- Stream Result - used to stream an InputStream back to the browser (usually for file downloads)
- Velocity Result - used for Velocity integration
- XSL Result - used for XML/XSLT integration
- PlainText Result - used to display the raw content of a particular page (eg. jsp, html etc)
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:
...