WARN PageNotFound:208 - Request method 'POST' not supported
在地址栏输入网址访问页面 ,用的是GET方法。
在用ajax接收后台数据,根据返回值进行提示或页面跳转时报:WARN PageNotFound:208 - Request method 'POST' not supported
原因是在第二次加载登陆界面时,用的是POST方法,所以在controller中的 method=" ",方法要补充上post 或者 不写method。
@RequestMapping(value="/login",method=RequestMethod.GET)
public String login()
{
return "login";
}
改成:
@RequestMapping(value="/login",method ={RequestMethod.GET,RequestMethod.POST})
public String login()
{
return "login";
}
或者:
@RequestMapping(value="/login")
public String login()
{
return "login";
}
WARN PageNotFound:208 - Request method 'POST' not supported的更多相关文章
- 常见踩坑案例(二)-Request method 'POST' not supported
一 前言 最近涉及到与前后端的数据对接,按道理来说没一点压力结果被一前端童鞋带坑里去了(不过也是很久没写过这种前后端分离进行联调的事情了,如果是一个人全套弄的话就不会出现下面问题). 二 Reques ...
- 记另类Request method 'GET' not supported
一般遇到Request method 'GET' not supported这种问题,大家都会找相应controller下的具体方法,把get改为post之类.但是我这次是在访问静态资源,static ...
- Spring boot: Request method 'DELETE' not supported, Request method 'PUT' not supported, Request method 'POST' not supported
GET,POST,PUT,DELETE, Spring都支持,不要怀疑Spring, 一定是前端发送的rest 请求和后端的响应不匹配, 查找原因以及解决办法, 很简单 用chrome打开F12控制台 ...
- org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'PUT' not supported
1:先上控制台报错信息 org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'PUT' not ...
- SpringMVC框架出现 405 request method post not supported 的解决方法
在SpringMVC框架中当使用post请求服务,然后请求成功转到一个静态文件,如html,htm等网页时.页面出现405 request method post not supported错误,只要 ...
- Request method 'POST' not supported错误和解决方法
在使用SpringBoot的时候,在html页面用form表单post提交数据的时候报错: Request method 'POST' not supported 错误解析: 我是用的前端页面是HTM ...
- springmvc访问静态资源出现Request method 'GET' not supported
答案最后.:D 默认的访问的URL都会被DispatcherServlet所拦截. 这里说一下如何配置springmvc访问静态文件. <mvc:default-servlet-handler/ ...
- Request method 'GET' not supported
Request method 'GET' not supported 错误原因: GET请求不被允许. 解决方法: 1.从客户端入手.假设浏览器中的js用了ajax发起异步请求GET,将GET改为PO ...
- 警告: Request method 'POST' not supported的原因之一
警告: Request method 'POST' not supported是经常遇到的,这里记录一下我经常遇到的一种情况,以免忘记. 我使用拦截器拦截所有请求,然后列出不拦截的请求.有时候由于自己 ...
随机推荐
- django分页
page_count = 1 current_page = int(request.GET.get('p',1)) course1 = Course.objects.all().order_by('- ...
- Python extend()方法--list
描述 extend()方法:在列表末尾追加可迭代对象中的元素. 语法 语法格式:list.extend(iterable) 参数 iterable:可迭代的对象,这里的对象可以是字符串.列表.元组.字 ...
- Windows Server 2012 R2服务器部署Tomcat JDK、安装Mysql以及将Java项目部署到CVM
我们平时所调试的Java Web 项目需要在本地Eclipse或者MyEclipse当中开发调试,并且部署到Tomcat上来测试,比如说笔者这里用的eclipse添加tomcat服务器, 但是这里发布 ...
- docker制作tomcat镜像
准备cestos镜像.tomcat.jdk cestos是docker pull下来的 在/opt/下创建docker:mkdir -p /opt/docker 把tomcat和jdk解压到docke ...
- 免登陆下载jdk
linux下使用wget免登陆获取jdk对应版本gz包 wget --no-check-certificate --no-cookies --header "Cookie: oracleli ...
- 下载安装Git
1.下载地址:https://git-scm.com/download/win 这里是下载64位的 2.安装步骤 (1)下载完成得到一个exe文件,双击傻瓜式安装 (2)开始安装 (3)选择安装的工 ...
- Random-Forest-Python
1. 近期目标,实现随机森林进行点云分类 1)学习阶段: [干货]Kaggle 数据挖掘比赛经验分享 Kaggle Machine Learning Competition: Predicting T ...
- NABCD分析---校园服务
N(需求): 大学生活中,很多琐碎的小事浪费同学时间精力.我们的APP本着为同学服务的宗旨,解决生活中各方面的问题,同学们可以在APP上发布各种信息,例如兼职,二手买卖等等. A(做法): 用户打开A ...
- Javascript扩展String.prototype实现格式金额、格式时间、字符串连接、计算长度、是否包含、日期计算等功能
<script src="Js/jquery-3.1.1.min.js"></script> <script type="text/java ...
- winsock I/O模型的分析
几种winsock I/O模型的分析 套接字是通信的基础,是支持网络协议数据通信的基本接口.Winsocket 提供了一些有趣的I/O模型,有助于应用程序通过一种“异步”方式,一次对一个或者多个套接字 ...