用url 传中文 可是老是出现乱码,求解决啊!!!
最不能理解的是 我写了一个demo
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
PrintWriter out = response.getWriter();
String test = request.getParameter("test");
out.print(test);
}
这样访问 url:
http://localhost/EncodingCode/Message?test=中国
我直接点击Eclipse的运行,在IE里面数据上面的url 没有乱码, 可以我把这个demo部署到服务器上,在IE里面数据上面的url 就乱码了,为啥???