先给大家介绍一下我做的东西:我做的是一个登陆的jsp页面,登陆的用户名跟 密码的数据是从Oracle的数据库中得到的,当我输入英文用户名的时候登陆正常,当我输入中文名字的时候,就出项HTTP Status 500的页面 下面是HTTP Status 500 的具体内容:谢谢各位了。本人是菜鸟
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: java.lang.IllegalArgumentException: Control character in cookie value, consider BASE64 encoding your value org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.IllegalArgumentException: Control character in cookie value, consider BASE64 encoding your value org.apache.tomcat.util.http.ServerCookie.maybeQuote2(ServerCookie.java:396) org.apache.tomcat.util.http.ServerCookie.maybeQuote2(ServerCookie.java:389) org.apache.tomcat.util.http.ServerCookie.appendCookieValue(ServerCookie.java:293) org.apache.catalina.connector.Response.addCookieInternal(Response.java:1010) org.apache.catalina.connector.Response.addCookieInternal(Response.java:979) org.apache.catalina.connector.Response.addCookie(Response.java:967) org.apache.catalina.connector.ResponseFacade.addCookie(ResponseFacade.java:343) org.apache.jsp.NewFile_jsp._jspService(NewFile_jsp.java:71) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.26 logs.
Apache Tomcat/6.0.26
英文没问题,中文会有问题
会不会是编码的问题呢.?
这个我检查过了,都是UTF-8
@漫天de光: consider BASE64 encoding your value
cookie 中的编码有异常
请考虑使用base64编码
你的错误有提示的.