Struts 2 GXP result type implementation. Outputs GXP. Pulls GXP parameters from Struts 2's value stack.
Declare the GXP result type for your package in the xwork.xml file:
<result-types> <result-type name="gxp" class="org.apache.struts2.views.gxp.GxpResult"/> </result-types>
Or if you want to output XML instead of HTML:
<result-types> <result-type name="gxp" class="org.apache.struts2.views.gxp.GxpResult"> <param name="outputXml">true</param> </result-type> </result-types>
Outputting XML changes the content type from text/html to application/xml and configures the {@link GxpContext} to output XML. This is useful insituations like specifying the doctype of your GXP to be 'mobile'.
Use the GXP result type for the result of an action. For example:
<result name="success" type="gxp">/myPackage/MyGxp.gxp</result>
@author Bob Lee
@see org.apache.struts2.views.gxp.AbstractGxpResult