struts2中几个异常的解决

1    严重: Document is invalid: no grammar found. at (null:2:8)

org.xml.sax.SAXParseException: Document is invalid: no grammar found.

解决方法:在struts.xml 中添加

<!DOCTYPE struts PUBLIC
  "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd">


2    报错:

ERROR - Dispatcher initialization failed

Unable to load configuration. - bean - jar:file:/D:/Tomcat%206.0/webapps/demo/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:47:178


解决方法:

添加包 commons-fileupload-1.2.1.jar




你可能感兴趣的:(struts2中几个异常的解决)