浪曦_Struts2 学习视频 又问题
按照他说的写完,报错误,怎么回事呢?我的问题还是他的问题?<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="struts211" extends="struts-default" >
<action name="login" class="com.test.action.LoginAction" >
<result name="success">/resul.jsp</result>
</action>
</package>
</struts>
异常代码
严重: The content of element type "action" must match "((param|result|interceptor-ref|exception-mapping)*,allowed-methods?)". at (null:10:23)
org.xml.sax.SAXParseException: The content of element type "action" must match "((param|result|interceptor-ref|exception-mapping)*,allowed-methods?)".
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
2012-12-21 22:58:57 com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
严重: Dispatcher initialization failed
Unable to load configuration. - file:/D:/java/to7/to7/webapps/WebRoot/WEB-INF/classes/struts.xml:10:23
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:71)
... 27 more
2012-12-21 22:58:57 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Unable to load configuration. - file:/D:/java/to7/to7/webapps/WebRoot/WEB-INF/classes/struts.xml:10:23
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:483)
at org
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:113)
... 27 more --------------------编程问答-------------------- web.xml配了?? --------------------编程问答-------------------- web.xm代码贴上看下 --------------------编程问答-------------------- 去掉标签前面的空格试试。 --------------------编程问答-------------------- <web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
--------------------编程问答-------------------- 顶一下 谁帮帮
补充:Java , Web 开发