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>�û���???
<%@ 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>�û���???
解决方案 »
- java 自动刷新工程方法???
- SSH框架做的WEB网站怎么实现在线聊天功能
- acegi 与 注解事物 配置问题
- 配置了php+apache+mySql就无法启动MySql服务和IIS服务了
- 一个简单问题?
- 用JFreeChart遇到的奇怪问题
- 各位大侠 小弟想学Struts谁能提供最简单的入门例子,给100分.如果成功在+100决不食言,我以csdn号的名义保证!
- 使用JasperReport时出错,java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
- quartz一个小问题
- mina udp 客户端收不到数据
- 在myeclipse中打开DB Browser时怎么出现这样的错误?加分!
- 网站前后台问题
使用SQL语句出了问题
1,"好 ","h","[email protected]","2010-01-15 04:30:55"
6,"ç«å½±fans","lw198962","[email protected]","2010-01-15 00:00:00"
http://blog.csdn.net/crazylaa/archive/2009/12/24/5066784.aspxps:楼主已经做的很好了。
+ "?useUnicode=true&characterEncoding=utf-8";有问题吗
<Connector port="8888" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8"/>
String name=new String(name.getByte("ISO-8859-1"),"utf-8")
String name=new String(name1.getByte("ISO-8859-1"),"utf-8")
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") ,
总的感觉还是:欲哭无泪!