关于struts2配置后报404的错误,求大神指点
1.我定义了struts-android.xml配置文件
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="androidPackage" extends="struts-default">
<action name="enterpriseAction" class="jnew.action.android.servlet.EnterpriseInfoServlet">
<result name="success">admin/login.jsp</result>
</action>
</package>
</struts>
2.把struts2-android.xml文件包含到struts.xml配置文件里
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.action.extension" value="do" />
<constant name="struts.i18n.encoding" value="GBK"></constant>
<include file ="struts-default.xml" />
<include file ="struts-manage.xml" />
<include file ="struts-news.xml" />
<include file ="struts-enterprise.xml" />
<include file ="struts-trade.xml" />
<include file ="struts-member.xml" />
<include file ="struts-pub.xml" />
<include file ="struts-android.xml"/>
<package name="loginPackage" extends="struts-default">
<action name="login" class="jnews.action.SystemAction" method="login">
<result name="input">admin/login.jsp</result>
<result name="success">admin/admin_main.html</result>
</action>
<action name="closeSystem" class="jnews.action.SystemAction" method="closeSystem">
<result name="success">admin/login.jsp</result>
</action>
</package>
3.我的web.xml文件配置是
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
4我往地址栏输入的地址是http://localhost:8080/daxing/enterpriseAction.do
daixing是我的项目名
5.我报的错误是
HTTP Status 404 - There is no Action mapped for namespace / and action name enterpriseAction.
--------------------------------------------
type Status report
message There is no Action mapped for namespace / and action name enterpriseAction.
description The requested resource is not available.
struts2?404?
------解决方案--------------------你的项目名到底是 daxing 还是 daixing
-