摘要:一般Tocant 的url编码是iso-8859-1(查看tocat/conf/server.xml 中的Connector 节点没有写URIEncoding="xxxxxx") 如下: 如果我们在servlet 中写如下的代码 String username = request.getParameter("name");//name 是get 请求过来的参数,这里已经将get请求过来的字节码转化成iso-8859-1的的码了,解码错误 byte[] b = username.getBytes("iso-8859-1");//所以要重
阅读全文