请教个关于spring mvc PageNotFound的问题? 400 报错
2012-09-27 18:22:43,797 WARN [org.springframework.web.servlet.PageNotFound] -No mapping found for HTTP request with URI [/biz/js/jquery-1.5.1.min.js] in DispatcherServlet with name 'hisun' 2012-09-27 18:22:43,828 WARN [org.springframework.web.servlet.PageNotFound] -No mapping found for HTTP request with URI [/biz/images/login-top-bg.gif] in DispatcherServlet with name 'hisun' 2012-09-27 18:22:43,845 WARN [org.springframework.web.servlet.PageNotFound] -No mapping found for HTTP request with URI [/biz/images/login-wel.gif] in DispatcherServlet with name 'hisun' 2012-09-27 18:22:43,860 WARN [org.springframework.web.servlet.PageNotFound] -No mapping found for HTTP request with URI [/biz/images/login_bg.jpg] in DispatcherServlet with name 'hisun' 2012-09-27 18:22:43,873 WARN [org.springframework.web.servlet.PageNotFound] -No mapping found for HTTP request with URI [/biz/images/btn-bg2.gif] in DispatcherServlet with name 'hisun' 2012-09-27 18:22:43,894 WARN [org.springframework.web.servlet.PageNotFound] -No mapping found for HTTP request with URI [/biz/images/login-content-bg.gif] in DispatcherServlet with name 'hisun' 2012-09-27 18:22:43,908 WARN [org.springframework.web.servlet.PageNotFound] -No mapping found for HTTP request with URI [/biz/images/logo2.png] in DispatcherServlet with name 'hisun'
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
正常,因为你在web.xml里配置了dispatcherservlet的url是/或者/*。导致页面上所有对图片的请求也会被路由进spring mvc。在你的配置文件里配置一下静态资源就好了。
<mvc:resources mapping="/css/**" location="/css/" /> <mvc:resources mapping="/images/**" location="/images/" /> <mvc:resources mapping="/js/**" location="/js/" />
######嗯,果然还是这个问题,谢谢啊。上次对接口请求进行改造了请求地址的后缀。