method="get" 
把get改成post..

解决方案 »

  1.   

    LZ看看这个帖子:http://blog.sina.com.cn/s/blog_59d0c0c10100bkkf.html
      

  2.   

    req.setCharacterEncoding("gbk");你没设置 resp.setCharacterEncoding("gbk");用于重定向的
    resp.sendRedirect("登陆成功页面"); 
      

  3.   

    resp.setContentType("text/html;charset=gb2312");
    req.setCharacterEncoding("gbk");
    楼主的这段代码至少应该一致吧
      

  4.   

    先把method="get"改成method="post"
    get方法很容易乱码的
    Servlet中 把doGet方法中的内容写在doPost
    设置下请求、响应的编码格式 再试试看
      

  5.   

    楼主的代码从页面和请求最好用一种编码格式 比如GBK 那全部都是GBK 
      

  6.   

    把<form action="Register"method="get" >
    改成
    <form action="Register"method="post" >
    然后添加上resp.setContentType("text/html;charset=GBK");
    req.setCharacterEncoding("gbk");
    或者把接收值的地方改成
    String name =new String(request.getParameter("userpassword").getBytes("iso-8859-1"),"gbk");
      

  7.   

    <url-pattern>/Register</url-pattern>
    <form action="Register"method="get" >
    Register 改成register