Cannot find message resources under key org.apache.struts.action.MESSAGE
异常
Cannot find message resources under key org.apache.struts.action.MESSAGE
可能原因
很显然,这个错误是发生在使用资源文件时,而Struts没有找到资源文件。
Implicitly trying to use message resources that are not available (such as using empty html:options tag instead of specifying the options in its body -- this assumes options are specified in ApplicationResources.properties file)
XML parser issues -- too many, too few, incorrect/incompatible versions
Related Links
Provide Struts with Resource Bundle
http://threebit.net/tutorials/ejb/general/ XML Parser Issues
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg15779.html No input attribute for mapping path /loginAction
错误
No input attribute for mapping path /xxxxAction
可能原因e
No input attribute in action mapping in struts-config.xml file for the action with the name specified in the error message. An input attribute is not required if form validation is not performed (either because the validate attribute is set to false or because the validation method in the relevant form class is not implemented. The input attribute specifies the page leading to this action because that page is used to display error messages from the form validation.
Related Links
Strange Output Characters
错误
Strange and seemingly random characters in HTML and on screen, but not in original JSP or servlet.
可能原因
混和使用Struts的html:form标记和标准的HTML标记不正确。
使用的编码样式在本页中不支持。
"Document contained no data" or no data rendered on page
错误
"Document contained no data" in Netscape
No data rendered (completely empty) page in Microsoft Internet Explorer
可能原因
使用一个Action的派生类而没有实现perform()方法或execute()方法。在Struts1.0中实现的是perform()方法,在Struts1.1中实现的是execute()方法,但Struts1.1向后兼容perform()方法。
但你使用Struts1.1创建一个Action的派生类,并且实现了execute()方法,而你在Struts1.0中运行的话,就会得到"Document contained no data" error message in Netscape or a completely empty (no HTML whatsoever) page rendered in Microsoft Internet Explorer.”的错误信息。