1. Add the hardcoded JSP text to the applicationresources. properties file respectively, and add the key-value pairs as an example (Label. Success = SEARCH success !), Put the applicationresources. properties resource file in the SRC folder (Remove COM. BroadVision. struts1hardcodedelete in the following step), or a SRC package, such as com. BroadVision. struts1hardcodedelete.
2. modify the content of web. xml:
Set <init-param>
<Param-Name> application </param-Name>
<Param-value> com. BroadVision. struts1hardcodedelete. applicationresources </param-value>
</Init-param>
Before adding it to </servlet>, that is, placing it between <servlet> </servlet>.
3. Change the content of the struts-config.xml:
Set <message-Resources
Parameter = "com. BroadVision. struts1hardcodedelete. applicationresources"
Null = "false"/>
Before you add </Struts-config>, that is, the end of the struts-config.xm file.Null = "false"Not required. Otherwise, nullexception, message, andCannot find Message Resources under key org. Apache. Struts. Action. MessageError
4. introduced at the beginning of the corresponding JSP file <% @ taglib uri = "/WEB-INF/TLDs/struts-bean.tld" prefix = "Bean" %> (bean TLD file path ), <Bean: Message key = "label. success "/>. Label. Success is the key value of the first step.
If any omission exists, please correct it. Thank you!