Add this link if repostedHttp://blog.csdn.net/imainTable Source
The following are my first problems with Struts:
1. Tomcat is started successfully, but an error is reported when running the program:HTTP status 404-(/Wisdom/inputcontent. jsp ). Error cause:
C:/Tomcat 4.1/webapps/wisdom/WEB-INF/the lack of struts Tag file (. TLD), the lack of. TLD file copy to the directory can be.
2. The running program appearsCannot find Message Resources under key org. Apache. Struts. Action. MessageError. It indicates that it cannot be found.Applicationresources. Properties, Pay attention to the following four aspects.
First, add the following content to the Web. xml file <web-app> <servlet> "</servlet> </Web-app>.
<Init-param>
<Param-Name> application </param-Name>
<Param-value> applicationresources </param-value>
</Init-param>
Second: add the following settings in the struts-config.xml:
<Message-resources parameter = "applicationresources"/>
This setting is best placed in: </Action-mappings>"Put it here"</Struts-config>
Third: EnsureApplicationresources. PropertiesFiles are in the WEB-INF/classes folder you created.
You can put applicationresources. properties in other directories in the classes folder, for example:
Put applicationresources. properties in the WEB-INF/classes/mydir folder.Struts-config.xmlMust be modified
<Message-resources parameter = "mydir/applicationresources"/>
Fourth: it may be a key value issue. Struts resource files can also be configured in Multi-resource source files, such as the configuration.
<Message-resources parameter = "applicationresources" Key = "myappres"/>
If there is only one resource file with a key, it will throwOrg. Apache. Struts. Action. MessageAn error occurred. Delete the key.