转载自:http://blog.sina.com.cn/s/blog_534f69a00101332u.html

1.问题:

No mapping found for HTTP request with URI

出现这个问题的原因是在web.xml中配置错了,如:

<servlet>
 <servlet-name>springMVCDispatcherServlet</servlet-name>
 <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
 <init-param>
 <param-name>contextConfigLocation</param-name>
 <param-value>/WEB-INF/springMVC-servlet.xml</param-value>
 </init-param>
  <load-on-startup>1</load-on-startup>
 </servlet>
 <servlet-mapping>
 <servlet-name>springMVCDispatcherServlet</servlet-name>
 <url-pattern>/*</url-pattern>
 </servlet-mapping>

2.分析:

当你在control中返回一个路径的时候,它又把路径(/view/index.jsp)当作一个请求被dispatcherServlet所拦截。所以会抛出异常,解决的办法有两个:

3.解决:

第一即使让dispatcherServlet的拦截加上后缀如:*.do;

这样以jsp后缀的就不会别拦截了。

第二个方法是在spring-servlet.xml中加入:

<mvc:default-servlet-handler/>

springMVC No mapping found for HTTP request with URI的更多相关文章

  1. springmvc No mapping found for HTTP request with URI in Dispatc

    springmvc No mapping found for HTTP request with URI in Dispatc 博客分类: Java Web springmvcspring MVCNo ...

  2. 【错误信息】springMVC No mapping found for HTTP request with URI

    出现这个问题的原因是在web.xml中配置错了:

  3. 相对路径获取项目文件 及报错 No mapping found for HTTP request with URI XXX in DispatcherServlet with name ‘springmvc’解决方法

    首先一点,WebRoot目录下的文件是都可以通过浏览器输入路径,直接读取到的 例如这样: 而WebRoot下面WEB-INF是无法浏览器输入路径直接读取的. 因为是受保护的. 如果jsp读取一个图片的 ...

  4. No mapping found for HTTP request with URI [/crmcrmcrm/css/bootstrap.min.css] in DispatcherServlet with name 'springMvc'

    先把错误贴上来 No mapping found for HTTP request with URI [/crmcrmcrm/css/sb-admin-2.css] in DispatcherServ ...

  5. Servlet3模块化应用中,@Controller没有被注入,导致出现:No mapping found for HTTP request with URI [/xxx/xxx] in DispatcherServlet with name 'springmvc'

    问题描述:Servlet3模块化应用中,@Controller没有被注入,导致出现: org.springframework.web.servlet.DispatcherServlet noHandl ...

  6. No mapping found for HTTP request with URI [/spring_liu/hello.do] in DispatcherServlet with name 'SpringMVC'

    控制台一直报No mapping found for HTTP request with URI [/spring_liu/hello.do] in DispatcherServlet with na ...

  7. '/'和‘/*’差异造成的No mapping found for HTTP request with URI [/springMVC/welcome.jsp] in DispatcherServlet with name 'springmvc'

    在采用springMVC框架的时候所遇到的一个小问题,其中web.xml中关于servlet的配置如下: <servlet> <servlet-name>springmvc&l ...

  8. SpringMvc出现No mapping found for HTTP request with URI的终极解决办法

    No mapping found for HTTP request with URI 出现这个问题的原因是在web.xml中配置错了,如: <servlet> <servlet-na ...

  9. springmvc搭建环境时报No mapping found for HTTP request with URI [/exam3/welcome] in DispatcherServlet with name 'spring2'

    项目是使用spring MVC (1)在浏览器中访问,后台总报错: No mapping found for HTTP request with URI [/exam3/welcome] in Dis ...

随机推荐

  1. MarkDown 图片大小问题

    本系列文章由 @YhL_Leo 出品,转载请注明出处. 文章链接: http://blog.csdn.net/yhl_leo/article/details/50099843 MarkDown里显示图 ...

  2. "pom.xml" could not be activated because it does not exist.

    "pom.xml" could not be activated because it does not exist. 在sts中使用maven build,输入package然后 ...

  3. datatable 前台和后台数据格式

    datatable是很强大的前台表格插件,前台定义好表格格式后,后台须要返回指定格式的json数据! 例如以下: 首先是js的定义: var oTable = $('#sample_editable_ ...

  4. jquery-easyui的datagrid在checkbox多选时,行选中不正确应,去除高亮的解决方法

    jquery-easyui的datagrid在checkbox多选时,行选中不正确应,去除高亮的解决方法 工作中用到一个具有多选功能的easyui-datagrid在处理cell的点击事件时,不同 ...

  5. What is the difference between SET and SELECT when assigning values to variables, in T-SQL?

    http://vyaskn.tripod.com/differences_between_set_and_select.htm https://stackoverflow.com/questions/ ...

  6. 英语影视台词---六、Saving Private Ryan Quotes

    英语影视台词---六.Saving Private Ryan Quotes 一.总结 一句话总结: Saving Private Ryan is a 1998 American epic war fi ...

  7. SVN: repository browser 库浏览器

    SVN: repository browser  库浏览器 -----如果不想全部下载,可以通过repository browser  库浏览器 从库中选择要下载的文件夹内容下载(svn针对性下载)

  8. PostgreSQL Replication之第九章 与pgpool一起工作(3)

    9.3 理解pgpool的架构 一旦我们安装了pgpool,是时候来讨论软件架构了.从一个用户的角度看,pgpool就像一个 正常的数据库服务器,您可以想连接任何其他服务器一样连接到它: pgpool ...

  9. rem自适应布局-移动端自适应必备:flexible.js

    http://caibaojian.com/flexible-js.html

  10. PL/SQL恢复默认窗口样式

    对于初学者来讲,使用PL/SQL时会不小心将窗体关闭,如下图 2. 怎么恢复呢?其实很简单 3. 搞定 转自:http://blog.csdn.net/hello_word2/article/deta ...