本文解决了JSP的URL字符 encoding 问题:
如果通过 get/post 方式从 browser 返回的值中包含汉字信息, servlet 将无法得到正确的值。
解决方案
http://www.fightfly.com/index.jsp?value=你好
解决方案是用这种方案:
<%@ page contentType=’text/html;charset=gb2312′ %>
<html>
你好<%=new String(request.getParameter(‘value’).getBytes(‘8859_1′),’gb2312’)%>
</html>