Basic configuration of 6.5 Struts2
1web.xml
function: Load Core filter
Format: <filter>
```````
</filter>
<filter-mapping>
<filter-name> Filter Name </filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
2 Drfault Properties
Function: Set the default value of the main office property
3 struts.properties
Function: Change the default value of the main office property
Location: src Directory
4 Struts-default.xml
Function: Sets the default value of the corresponding tag attribute in the Struts.xml file and the introduction of the default Interceptor
5 struts.xml Core Configuration tag
Format <struts>
<include file= " the file that was introduced " />
<constau name="Main Office Property name"value="value"/>
<packahe name="Package Name"extends="Inherited Packages"[namespace="name Space"]>
<action name="Object name/Access format"class="class full Name"[method]="Execute"Requested method >
<result name="identify the results after processing"[Type="DispeTcher/redirect/chain/redirectaction"]>
Invoke action dynamically
Using action to access the format
Format Xxaction!methodname.action
Note Modify Struts.enable.DynamicMethodInvacation =true
With wildcard characters
< /span> Span style= "Mso-spacerun: ' Yes '; font-size:9.0000pt; font-family: ' Wingdings '; ">à à represents any content
< /span> {0} à à represents the contents of all" * "&NBSP;&NBSP;&NBSP;&NBSP;{1}~{9}&NBSP; à à represents the use of the first to Nineth wildcard character
Action Processing result-result
1) R esult Tag Format
Name: matches the return value within a method in the action
Type:dispatcher/redirect/chain/redirectaction
Note: If the request resource is action, the format is ActionName
2) use a wildcard character
Struts2 Learning Basics Note 2