struts2.2.3部署到tomcat上无法访问求解
web.xml代码:<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.
xmlns:xsi="http://www.
xsi:schemaLocation="http://java.
http://java.
<filter>
<filter-name>struts2.2.3</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2.2.3</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
struts.xml代码:<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
"http://struts.
<struts>
<package name="demo" namespace="/demo" extends="struts-default" >
<action name="demo1" class="com.ren.DemoAction">
<result name="suc">/index.jsp</result>
</action>
</package>
</struts>
DemoAction.java:
public class DemoAction {
public String execute(){
return "suc";
}
}
TOMCAT版本6.0,直接解压缩的什么也没改,部署项目也成功了,就是当我用路径http://localhost:8080/demo2/demo/demo1访问ACTION时总是404这是为什么,无语了。