警告: No mapping found for HTTP request with URI [/mark_head/WEB-INF/jsp
来源:互联网 发布:链家端口报买系统图片 编辑:程序博客网 时间:2024/06/05 18:02
这个问题出现的原因是在第一次访问接口成功的时候后转到jsp页面的时候,想要的情况是跳转到另一个jsp,然后在网上一通乱查乱改,在web.xml改<servlet> <url-pattern>/*</url-pattern></servlet>变成 <url-pattern>/</url-pattern>不行,然后在扫描注解 加上*,像这样<context:component-scan base-package="com.bejing.*" />,但是还是没什么用,后来觉得应该是返回的问题,然后在@RequestMapping(value="/login",method=RequestMethod.POST, produces = "text/html;charset=UTF-8" )加上了@ResponseBody,加上它对于ajax请求就能够按照原路返回了。
另外值得说的就是在ajax请求中重定向和请求转发都是不起作用的,下面是从http://blog.csdn.net/ideality_hunter/article/details/61680554博客中找到的。
1)正常的http url请求,只有浏览器和服务器两个参与者。浏览器端发起一个http请求,服务器端处理后发起一个重定向,浏览器端从response中获取到重定向地址,发起另一个http url请求。也就是说,浏览器会按照response中的内容进行响应(如重定向),这是浏览器的功能决定的就得响应。
2)Ajax请求,参与者就有三个即ajax、客户端、服务器,ajax处于客户端和服务器两者之间。过程是客户端发起一个ajax请求,服务器端处理后,如果发起一个重定向,然后ajax会怎么办呢?它只会获取刚才请求返回的数据,其他的任何动作一概不去做,ajax是这么做的(ajax功能就是这么设定的,ajax框架源代码也是这么写的)。
也就是说,引入了ajax之后,ajax就插在浏览器和服务器之间了,服务器给浏览器的response被ajax拦截了,但是ajax本身却什么都不做,也不转达。
阅读全文
0 0
- 警告: No mapping found for HTTP request with URI [/mark_head/WEB-INF/jsp
- 警告: No mapping found for HTTP request with URI [/bks_xk/WEB-INF/jsps/first.jsp] in DispatcherServlet
- No mapping found for HTTP request with URI [/Demo/WEB-INF/page/login.jsp] in DispatcherServlet with
- No mapping found for HTTP request with URI [/spring/WEB-INF/page/index.jsp] in DispatcherServlet with name 'spring'
- 警告: No mapping found for HTTP request with URI [/Springmvc/test] in DispatcherServlet with dispatche
- 警告: No mapping found for HTTP request with URI [] in DispatcherServlet with name
- 警告: No mapping found for HTTP request with URI [/springmv/iew] in DispatcherServlet with name 'sprin
- 警告: No mapping found for HTTP request with URI的解决方案
- 搭建spring 和maven工程时发生警告No mapping found for HTTP request with URI
- 警告: No mapping found for HTTP request with URI [/web002/list.do] in DispatcherServlet 的解决方法
- STS error: No mapping found for HTTP request with URI
- Spring MVC 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
- spring 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
- Memcached的基本操作
- 项目实训第二周(1)--数据库表的设计与数据库建立
- Openvswitch手册(5): VLAN and Bonding
- C++多线程
- 6、jQuery插件之kindEditor富本编辑器与UEditor编辑器
- 警告: No mapping found for HTTP request with URI [/mark_head/WEB-INF/jsp
- Scala集合
- c/c++创建txt文件并写入指定目录下
- Android面试系列之异步消息处理相关
- 数据库连接池的作用及c3p0的详解
- vue-router 2.0 改变的内容总结一下
- SpringMvc的转换器
- Ubuntu下删除两个文件夹下相同文件名且相同内容的文件V1.1(分色排版)
- PHP单点登录出现的错误