1, *action.conversion-properties
such as (Point=com.test.converter.pointlistconverter)
Configuration file for the specific action class
2, *action.properties
such as (INVALID.FIELDVALUE.GRADUATION=\U6BD5\U4E1A\U65E5\U671F\U8F93\U5165\U9519\U8BEF)
Configuration file for specific field error message
2, in Struts.xml
<Actionname= "Register"class= "Com.test.action.RegisterAction"> <resultname= "Success">/registersuccess.jsp</result>
When an error message occurs, Struts automatically finds the input tag of the current action and performs a jump
<result name= "Input">/register.jsp</result> </Action>
3, struts.xml label description
The description of which constants need to be used in the constant--struts framework, which can be used as the basis for configuring global type conversions in the Type conversion section
Other configuration files included with include--
4. Struts local type Conversion error configuration method
A) Create the *.properties file in the same sibling directory as the corresponding *action
b) Fill in the Invalid.fieldvalue.fieldname= error message
5. Struts Global type Conversion error configuration method
A) Add constant tags to struts.xml
<name= "Struts.custom.i18n.resources" value= "message" ></constant>
b) Create the message.properties file in the SRC directory
c) fill in xwork.default.invalid.fieldvalue=[0] Error
6, Native2ascii Javac character conversion to ASCII code method
A) cmd--nativce2ascii source file. txt converted file. properties
7, type conversion is not successful int value will be given 0
8. When a type conversion is not possible, the STRUTS2 framework automatically adds the error through Addfielderror ()
Java Learning Notes (2)--struts2 type conversion, data validation important points of knowledge