No mapping found for HTTP request with URI
2013-12-11 00:07
405 查看
No mapping found for HTTP request with URI 关于spring mvc 中/ 和/*的一些理解
如果web.xml中拦截了/* 的请求就对应要在spring-servlet.xml中配置 <mvc:default-servlet-handler/> 来响应静态页面或者直接把web.xml文件中换成/ spring mvc 在返回页面时就不会重复跳入 dispatcherServlet
因为需要考虑静态文件的访问,所以本人的spring-servlet 文件最终是这样的
<context:component-scan base-package="com.jack.spring.test"/> <mvc:annotation-driven/> <mvc:resources mapping="/images/**" location="/images/"/> <mvc:resources mapping="/css/**" location="/css/"/> <mvc:resources mapping="/scripts/**" location="/scripts/"/> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:viewClass="org.springframework.web.servlet.view.JstlView" p:order="2" p:contentType="text/html;charset=utf-8" p:prefix="/pages/" p:suffix=".jsp" p:cache="true" /> <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver" p:defaultEncoding="utf-8" p:maxInMemorySize="100000000" />
参考文章:http://blog.sina.com.cn/s/blog_534f69a00101332u.html
相关文章推荐
- 关于No mapping found for HTTP request with URI和in DispatcherServlet with name 'qht_client'
- No mapping found for HTTP request with URI [/DZCX_Manage/host/toHostMsg.action
- No mapping found for HTTP request with URI
- No mapping found for HTTP request with URI...
- springmvc No mapping found for HTTP request with URI in Dispatc
- No mapping found for HTTP request with URI in DispatcherServlet with name 'XXX'
- Spring mvc No mapping found for HTTP request with URI
- springMVC No mapping found for HTTP request with URI
- Spring3中js/css/jpg/gif等静态资源无法找到(No mapping found for HTTP request with URI)问题解决
- No mapping found for HTTP request with URI [/login.do] in DispatcherServlet with name 'spring'
- No mapping found for HTTP request with URI
- #前端笔记#导入js等静态文件时报错:No mapping found for HTTP request with URI
- spring mvc No mapping found for HTTP request with URI [] in DispatcherServlet
- No mapping found for HTTP request with URI 解决办法
- Spring3中js/css/jpg/gif等静态资源无法找到(No mapping found for HTTP request with URI)问题
- No mapping found for HTTP request with URI
- springMVC No mapping found for HTTP request with URI
- 警告: No mapping found for HTTP request with URI [/mark_head/WEB-INF/jsp
- WARN PageNotFound:1120 - No mapping found for HTTP request with URI [/favicon.ico] in DispatcherServ
- No mapping found for HTTP request with URI [/brand/findAll.do] in DispatcherServlet with name 'sprin