Could not find action or result There is no Action mapped for namespace /uppic and action name .?

今天,写图片上传时出现了这个错误:Could not find action or result
There is no Action mapped for namespace /uppic and action name . - [unknown location];
注意:此处的action name后面只有一个点!!!(如果你的异常action name后面有东西,例如:)
Could not find action or result There is no Action mapped for namespace /uppic and action name .?
一,此处给出action name后只有点的解决办法
如图,页面虽然无法显示我的图片,但Tomcat已经将图片上传;
Could not find action or result There is no Action mapped for namespace /uppic and action name .?
Could not find action or result There is no Action mapped for namespace /uppic and action name .?
百思不得其解,最后各方请教,终于发现问题所在:
(1),因为我的jsp界面是拷贝的另一个项目中body标签对里面的代码,且页面用到了jstl,导致部分界面没有导入jstl顶层文件,即页面没有导入如下代码:
<%@taglib prefix=“c” uri=“http://java.sun.com/jsp/jstl/core”%>
(2)show.jsp页面上图片上传的文件夹与action类中的上传至Tomcat的文件夹名不同
(3)拦截器最后返回了空
Could not find action or result There is no Action mapped for namespace /uppic and action name .?
3最后重新运行,错误解决!
Could not find action or result There is no Action mapped for namespace /uppic and action name .?
二,此处给出action name后面有东西的解决办法,例如: action name save_Users.如图:
Could not find action or result There is no Action mapped for namespace /uppic and action name .?
这一般情况下是你的配置文件有问题,如上{1}代表name属性值中的第一个*号,{2}代表第二个,form表单访问时直接写
要访问的方法名_实体类名(前提,你的命名要规范)如:save_Users.action(.action不能忘): save是UsersAction中的一个方法,Users是一个实体类;
Could not find action or result There is no Action mapped for namespace /uppic and action name .?