eclipse使用SSH框架出现There is no Action mapped for namespace [/] and action name [] associated with context path错误

eclipse使用SSH框架出现There is no Action mapped for namespace [/] and action name [] associated with context path错误,但是这个错误并没有影响程序正常运行。

看名字还以为是Action配置错误,一直在找Action的问题,也没发现配置错误,在网上搜索看到有人说要修改eclipse项目的classes文件夹,发现修改之后还是出错。

在Myeclipse中项目的classes文件夹是在\WebRoot\WEB-INF文件夹下,而eclipse开发的JavaEE项目的classes文件夹在build文件夹下,这是一点区别,但是之前用eclipse开发的项目没有修改过classes文件夹的路径也没有出现这个问题,更何况,我发现项目中有个.classpath文件,打开之后可以看到

Myeclipse的.classpath有一句

eclipse的的.classpath有一句

已经指定构建的路径,应该不是编译路径的错误

最后我发现web.xml文件中指定首页为index.html

  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>

而我的项目中首页文件名叫做index.htm,修改之后错误消失

之后再出现此错误,解决问题的思路

  1. 先看struts.xml是否在src
  2. .在检查struts.xml文件是否有错误
  3. web.xml文件配置struts.xml文件过滤器是否出错
  4. 那一定就是和我一样的错误了
原文地址:https://www.cnblogs.com/lz2017/p/6671297.html