spring mvc page not found no mapping found for http request with uri
来源:互联网 发布:男声变女声软件中文版 编辑:程序博客网 时间:2024/06/18 08:41
我这里的报错实际情况是:
14:02:15,736 WARN [PageNotFound] No mapping found for HTTP request with URI [/spring3MVC/abc/index.do] in DispatcherServlet with name 'spring3MVC'
其中,[spring3MVC/abc/index.do]是我请求的路径,就我现在的项目,我的请求路径是:
http://localhost:8080/spring3MVC/abc/index.do
spring3MVC是我的项目名,abc是action的注解用的,index是方法的注解
@Controller@RequestMapping("/abc")public class ZhujieRequestController { protected final transient Log log = LogFactory.getLog(ZhujieRequestController.class); @RequestMapping("/index") public String index() { return "hello"; }}
其它的配置文件,比如web.xml和一些jdbc连接的我就不说了,就说核心xml文件:spring3MVC-servlet.xml
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"xmlns:context="http://www.springframework.org/schema/context"xmlns:mvc="http://www.springframework.org/schema/mvc"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd"><!--自动扫描的包名 --><context:component-scan base-package="com.ideawu" /><!-- 默认的注解映射的支持 --><!-- <mvc:annotation-driven /> --><!-- 视图解释类 --><bean id="viewResolver"class="org.springframework.web.servlet.view.InternalResourceViewResolver"><property name="prefix" value="/" /><property name="suffix" value=".jsp" /><!--可为空,方便实现自已的依据扩展名来选择视图解释类的逻辑--><property name="viewClass"value="org.springframework.web.servlet.view.JstlView" /></bean><!-- 通过注解请求action里面的方法--><bean id="annotationHandlerMapping"class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"><property name="order" value="0" /><property name="useDefaultSuffixPattern" value="false" /><!--请注意这里,value="false",就因为这个false,我从早上8点,弄到下午2点--></bean><beanclass="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" /></beans>
基本配置就是这样,服务重启了好多变,总是不行,后来,我把<property name="useDefaultSuffixPattern" value="false" />
的value改为true,就正常了。 哎,我也是刚学,碰到这个问题。 还好运气好,搞定了- spring mvc page not found no mapping found for http request with uri
- Spring MVC No mapping found for HTTP request with URI
- Spring MVC------No mapping found for HTTP request with URI
- Spring mvc No mapping found for HTTP request with URI
- spring No mapping found for HTTP request with URI
- spring mvc No mapping found for HTTP request with URI [] in DispatcherServlet
- Spring 3 MVC No mapping found for HTTP request with URI (转)
- 解决spring mvc No mapping found for HTTP request with URI错误的三种方法
- java spring mvc Error:No mapping found for HTTP request with URI
- 解决spring mvc No mapping found for HTTP request with URI错误的三种方法
- Spring MVC静态资源拦截(No mapping found for HTTP request with URI in DispatcherServlet with name ' ')问题
- STS error: No mapping found for HTTP request with URI
- No mapping found for HTTP request with URI
- No mapping found for HTTP request with URI
- no mapping found for http request with uri
- mark springmvc [No mapping found for HTTP request with URI]
- 不一样的No mapping found for HTTP request with URI
- No mapping found for HTTP request with URI
- Android中用BaseAdapter实现带Button和显示网络图片的Listview
- 备份mysqldump ;Got error: 1016:
- 网易前端JavaScript编码规范
- debain实现交叉编译gdb和gdbserver
- postgresql集群方案hot standby 安装和测试
- spring mvc page not found no mapping found for http request with uri
- 通过javascript在光标处插入文本
- 关于TIME_WAIT
- JS延迟加载或JS最后加载加快网页打开速度
- db40好的链接
- dm365管脚复用配置浅析之davinci_cfg_reg调用
- 推荐两个界面原型设计工具--GUIDesignStudio 和 Mockups For Desktop
- objective-c内存管理一点总结
- SSH小例子