Cannot find message resources under key org.apache.struts.action.MESSAGE

阅读更多
异常1:
Cannot find message resources under key org.apache.struts.action.MESSAGE


bug原因:没有在struts.xml配置ApplicationResources:
解决办法:
步骤1.struts-config-core.xml配置:
	
	
	
	
	

步骤2.在下面系统文件夹加入properties文件
src/platform/Resource
              |_propertirs
                     |_ApplicationResources_cn.properties
                     |_ApplicationResources.properties






异常2:异常1解决以后,重启报异常
org.xml.sax.SAXParseException: The content of element type "struts-config" must match "(display-name?,description?,data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)"



解决办法:
参考1: http://bigdragon.iteye.com/blog/1465018
参考2: http://blog.csdn.net/yunxihanherui/article/details/7486132
在web.xml启动struts1的地方加入:
   	
  
    struts1
    org.apache.struts.action.ActionServlet
    
      config
      
      /WEB-INF/classes/struts/core/struts-config-core.xml,
	  /WEB-INF/classes/struts/example/struts-config-example.xml,
	  /WEB-INF/classes/struts/tools/struts-config-document.xml
	  
    
     加入段代码就OK了!
      validating   
      false   
     
    
      debug
      2
    
    2
  







参考资料: http://www.cnblogs.com/tjsquall/archive/2008/11/27/1342258.html




你可能感兴趣的:(struts,bug)