使用Struts2时出现There is no Action mapped for namespace / and action name .
2012-11-16 11:06
459 查看
今天,在使用Struts2时,运行老是提示There is no Action mapped for namespace / and action name .
根据提示,可以判定应该是该命名空间下不存在这样的action
但是,仔细查看之后配置是正确的
经过一一判断Struts.xml和web.xml发现,web.xml内容如下:
而在项目中,并不存在welcom-file-list下的这几个元素定义的页面,所以直接在Eclipse中运行项目之后,找不到页面,提示了错误
修改成相应的welcom-file后,运行正确
根据提示,可以判定应该是该命名空间下不存在这样的action
但是,仔细查看之后配置是正确的
经过一一判断Struts.xml和web.xml发现,web.xml内容如下:
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>8.1</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> <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>
而在项目中,并不存在welcom-file-list下的这几个元素定义的页面,所以直接在Eclipse中运行项目之后,找不到页面,提示了错误
修改成相应的welcom-file后,运行正确
相关文章推荐
- 使用Struts2时出现There is no Action mapped for namespace [/] and action name [??] associated with conte
- Struts应用出现的错误及解决方法:There is no Action mapped for namespace / and action name login
- struts 配置出现错误 There is no Action mapped for namespace [/] and action name [findPage] associated with
- 使用Struts2动态方法调用时(DMI)出现There is no Action mapped for namespace [/user] and action name [user!add] 问题
- eclipse中配置struts2出现There is no Action mapped for namespace [/] and action name...
- struts处理.do后缀请求报Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- Could not find action or result,There is no Action mapped for namespace / and action name hello_struts. - [unknown location]
- 每当使用struts2动态方法调用时,总是出现错误:There is no Action mapped for namespace [/user] and action name [user!add]
- Struts常见异常解答:There is no Action mapped for namespace / and action name . - [unknown location]
- 关于struts的There is no Action mapped for namespace [/] and action name....异常
- struts2中出现There is no Action mapped for namespace / and action name . - [unknown location]
- Struts错误:There is no Action mapped for namespace / and action name
- struts.xml不在默认位置,导致出现HTTP Status 404 - There is no Action mapped for namespace [/] and action name [
- 在使用了Maven后出现了There is no Action mapped for namespace [/] and action name [*] associated with context
- struts2种出现的There is no Action mapped for namespace [/] and action name 错误
- eclipse中配置struts2出现eclipse中配置struts2出现There is no Action mapped for namespace [/] and action name [L
- There is no Action mapped for namespace [/] and action name [] associated with context path [/struts
- struts2常见配置解决错误There is no mapped for namespace[/] and action name
- Struts2中关于"There is no Action mapped for namespace / and action name"的总结
- structs错误--There is no Action mapped for namespace / and action name"