严重: Dispatcher initialization failed Unable to load config
struts2吧
全部回复
仅看楼主
level 1
求助大神解答~谢谢谢谢!!!百度了好久都不适合我这个问题,核心jar包都配好了,2.3.24.1的
严重: Dispatcher initialization failed
Unable to load configuration. - action - file:/D:
web.xml如下:
<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>
struts.xml如下:
<struts>
<!-- 定义其它常量 -->
<package name="default" namespace="/" extends="struts-default">
<action name="hello" class="allen.Helloaction"><!-- class="allen.HelloAction" -->
<!-- name属性定义该action的名称,result中的name表示接收action中返回的字符串实现逻辑视图与物理视图之间的映射 -->
<result name="success">/HelloWorld.jsp</result>
<!-- 可以添加多个action -->
</action>
</package>
<!-- 可以添加多个package -->
</struts>
action类如下:
public class Helloaction extends ActionSupport {
@Override
public String execute() throws Exception {
System.out.println("执行");
return SUCCESS;
}
}
2015年12月19日 06点12分 1
1