jsp.java,数据库、服务器都使用utf-8编码,数据库中还是乱码啊!
  <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page contentType="text/html;charset=utf-8"%>
<%@ page import="myClass.*"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>火影fans乐园</title>
<meta content="all" name="robots" />
<meta name="火影fans" content="www.huoyingfans.com,火影fans" />
<meta name="Copyright" content="版权归火影fans所有" />
<meta name="author" content="火影fans" />
<meta name="description" content="火影fans的个人网站" />
<meta name="keywords" content="火影fans的个人网站" />
<meta http-equiv=content-type content="text/html; charset=utf-8">
<jsp:useBean id="article" class="myClass.Article" scope="page" />
<jsp:useBean id="articleManager" class="myClass.ArticleManager"
scope="page" /><link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="http://www.w3cn.org/favicon.ico"
type="image/x-icon" />

<link href="home/css/header.css" rel="stylesheet" type="text/css">
<link href="home/css/footer.css" rel="stylesheet" type="text/css">
<link href="home/css/link.css" rel="stylesheet" type="text/css">
****************************************************************************************
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page contentType="text/html;charset=utf-8"%>
<%@ page import="myClass.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv=content-type content="text/html; charset=utf-8">
    
    <title>登录响应</title>
    
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page"> <jsp:useBean id="register" class="myClass.UserManager" scope="page" />
<jsp:useBean id="user" class ="myClass.User" scope="page"/>
  </head> <body>
注册检测页面!
<br>
<% 
String name = request.getParameter("name");
 String password =request.getParameter("password");
 String email =request.getParameter("email"); 

 user.setName(name);
 user.setPassword(password);
 user.setEmail(email);
register.setUser(user);
        boolean b = register.addUser();
        if(b){
%>
<jsp:forward page="registerSuccess.jsp"/>
<%}else{} %>
<jsp:forward page="registerFailure.jsp"/>
</body>
</html>�û���??? 

解决方案 »

  1.   

    数据库 用的编码不是UTF-8
      

  2.   

    看看你的IE... 查看->编码->  是什么.嘿嘿
      

  3.   

    看来有人对编码有点认识啦,我还是建议lz最好就编码都用UTF-8
      

  4.   

    直接在数据库里写入汉字,正确;
    使用SQL语句出了问题 
    1,"好 ","h","[email protected]","2010-01-15 04:30:55"
    6,"火影fans","lw198962","[email protected]","2010-01-15 00:00:00"
      

  5.   

    web乱码
    http://blog.csdn.net/crazylaa/archive/2009/12/24/5066784.aspxps:楼主已经做的很好了。
      

  6.   

    private static String url = "jdbc:mysql://localhost/mydb"
    + "?useUnicode=true&amp;characterEncoding=utf-8";有问题吗
      

  7.   

    jdbc url参考:jdbc:mysql://localhost:3306/test?user=root&password=& useUnicode=true&characterEncoding=utf8&autoReconnect=true&failOverReadOnly=false&amp;c 什么意思?amp;???是否后面把你的略过了?
      

  8.   

    同意,检查入库之前是否已经乱码,再者,提交方式是post还是get,如果是get并且使用Tomcat服务器,检查Tomcat/conf/server.xml中的
    <Connector port="8888" protocol="HTTP/1.1" 
                   connectionTimeout="20000" 
                   redirectPort="8443" URIEncoding="UTF-8"/>
      

  9.   

    String name1 = request.getParameter("name");
    String name=new String(name.getByte("ISO-8859-1"),"utf-8") 
      

  10.   

    String name1 = request.getParameter("name");
    String name=new String(name1.getByte("ISO-8859-1"),"utf-8") 
      

  11.   

    String name1 = request.getParameter("name");
    String name=new String(name.getByte("ISO-8859-1"),"utf-8") 正确显示了;
    刚刚学时,全部使用gbk编码,为了解决乱码问题,书本上使用的是
    String name1 = request.getParameter("name");
    String name=new String(name.getByte("ISO-8859-1"),"gbk") ,
    总的感觉还是:欲哭无泪!