HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalArgumentException: Control character in cookie value or attribute.
type Exception report message Request processing failed; nested exception is java.lang.IllegalArgumentException: Control character in cookie value or attribute. description The server encountered an internal error that prevented it from fulfilling this request. exception org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalArgumentException: Control character in cookie value or attribute.
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
root cause java.lang.IllegalArgumentException: Control character in cookie value or attribute.
org.apache.tomcat.util.http.CookieSupport.isHttpSeparator(CookieSupport.java:205)
org.apache.tomcat.util.http.CookieSupport.isHttpToken(CookieSupport.java:229)
org.apache.tomcat.util.http.ServerCookie.appendCookieValue(ServerCookie.java:185)
org.apache.catalina.connector.Response.generateCookieString(Response.java:1054)
org.apache.catalina.connector.Response.addCookie(Response.java:996)
org.apache.catalina.connector.ResponseFacade.addCookie(ResponseFacade.java:380)
admin.membersheep.hk.Controller.HomeController.Login(HomeController.java:327)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:220)
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:134)
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.85 logs.

IllegalArgumentException此异常表明向方法传递了一个不合法或不正确的参数

注意Control character in cookie value or attribute 这个才是重点

问题说明Cookie编码格式错误

解决办法cookie存储值是指明utf8国际编码格式

javax.servlet.http.Cookie realCookie = new javax.servlet.http.Cookie(java.net.URLEncoder.encode(temp.getName(),"utf8"),java.net.URLEncoder.encode(temp.getValue(),"utf8"));

cqlpz

HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalArgumentException: Control character in cookie value or attribute.的更多相关文章

  1. HTTP Status 500 - Request processing failed; nested exception is java.lang.NullPointerException

    HTTP Status 500 - Request processing failed; nested exception is java.lang.NullPointerException type ...

  2. SSM框架报HTTP Status 500 - Request processing failed; nested exception is java.lang.NullPointerException错

    如下图 一番排查之后发现原来是server层写漏注释了 粗心大意,一天内出现两次写漏注释,SSM框架有意思.

  3. HTTP Status 500 - Handler processing failed; nested exception is java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config

    今天在用idea搭建spring mvc时候报了这个错误,缺少jstl的依赖包.由于是使用的spring-core的依赖,而spring-core里面是有jstl的.这就郁闷了,最后是在自己的pom. ...

  4. HTTP Status 500 - Handler processing failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment

    解决方案:修改catalina.sh 文件加上-Djava.awt.headless=true JAVA_OPTS="$JAVA_OPTS $JSSE_OPTS -Djava.awt.hea ...

  5. Request processing failed; nested exception is java.lang.IllegalArgumentException: No converter found for return value of type: class cn.e3mall.pojo.TbItem

    这个异常是缺少json相关的包 把以下依赖补上就好: <!-- Jackson Json处理工具包 --><dependency> <groupId>com.fas ...

  6. HTTP Status 500 - Request processing failed; nested exception is org.springframework.jdbc.BadSqlGram

    HTTP Status 500 - Request processing failed; nested exception is org.springframework.jdbc.BadSqlGram ...

  7. HTTP Status 500 - Request processing failed; nested exception is org.hibernate.exception.GenericJDBCException: could not execute statement

    1.什么操作出现:当我在项目中添加产品或者修改时,浏览器出现HTTP Status 500 - Request processing failed; nested exception is org.h ...

  8. SpringMvc错误:HTTP Status 500 - Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is n

    HTTP Status 500 - Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemExc ...

  9. HTTP Status 500 - Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    今天整合ssm框架 时 遇到的问题 困扰我好长时间     原因就是  mapper文件 没有被加载进来 但是 为什么没有被加载进来呢  因为中间的配置文件出了一些问题 网上大多数说法是   在pom ...

随机推荐

  1. Nginx系列p4:进程结构

    Nginx 有两种进程结构:单进程结构,多进程结构.本篇文章我们主要说多进程结构. 问:那为什么 Nginx 采用多进程结构,而不是多线程结构呢? 答:这是因为 Nginx 最核心的目的就是要保证高可 ...

  2. SAP_SD常用事务代码

    1.创建/修改/显示销售订单:VA01/VA02/VA03 2.根据销售订单创建交货单:VL01N 3.修改/显示交货单:VL02N/VL03N 4.交货单发货过账:VL02N 5.发货过账冲销:VL ...

  3. continue break

    #!/bin/bashfor i in `seq 10`do    if ((i%3==0))    thenecho !!        continue    fiecho $idone 结果: ...

  4. google docker镜像下载

    https://anjia0532.github.io/2017/11/15/gcr-io-image-mirror/

  5. Q7:Reverse Integer

    7. Reverse Integer 官方的链接:7. Reverse Integer Description : Given a 32-bit signed integer, reverse dig ...

  6. Q2:Add Two Numbers

    2. Add Two Numbers 官方的链接:2. Add Two Numbers Description : You are given two non-empty linked lists r ...

  7. CDH6.2安装配置第二篇:CDH安装的前期配置

    本篇介绍cdh安装之前需要的一些必要配置,当然这些配置也可以用shell脚本来配置.在安装之前请先配置好yum源,在文中用的统一都是阿里源.在安装的时候,要确保主机的内存是4G以上,要不然会无限重启c ...

  8. delphi内嵌汇编

    { 前面知道了一个汇编的赋值指令(MOV), 再了解一个加法指令(ADD), 就可以做个例子了. 譬如: ADD AX,BX; 这相当于 Delphi 中的 AX := AX + BX; 另外提前来个 ...

  9. re模块3

    #分组 () print(re.findall("(ad)/(vv)","adddad/vvdddddddddd")) print(re.findall(&qu ...

  10. atan2&sin

    //弧度转化角度:弧度*180/PI //角度转化弧度:角度*PI/180 #include <math.h> #include <stdio.h> const double ...