Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: XML
Posted by: JUNE CHERN
Added: Mar 15, 2020 4:32 PM
Modified: Mar 15, 2020 4:33 PM
Views: 127
Tags: struts
  1. <struts>
  2.     <!--  Overwrite Convention -->
  3.  
  4.     <!-- Uncomment the lines below to use Jackson XML bindings instead of the XStream library to handle XML serialisations -->
  5.     <!--
  6.        <bean name="jacksonXml" type="org.apache.struts2.rest.handler.ContentTypeHandler" class="org.apache.struts2.rest.handler.JacksonXmlHandler" />
  7.        <constant name="struts.rest.handlerOverride.xml" value="jacksonXml"/>
  8.    -->
  9.     <package name="default" namespace="/" extends="struts-default">
  10.         <!--        namespace + action name表示url路径,
  11.                    对于helloWorld的请求要由 helloWordAction 该类来处理
  12.        -->
  13.         <action name="sayhello" class="me.headmap.action.helloWordAction">
  14.             <result name="success">hello.jsp</result>
  15.         </action>
  16.         <action name="sayhi" class="me.headmap.action.helloWordAction">
  17.             <result name="success">hello.jsp</result>
  18.             <result name="failure">failure.jsp</result>
  19.         </action>
  20.  
  21.     </package>
  22.  
  23.     <package name="background" namespace="/background" extends="struts-default">
  24.         <action name="welcome" class="me.headmap.action.WelcomeAction">
  25.             <result name="ok">backhome.jsp</result>
  26.         </action>
  27.     </package>
  28. </struts>