读书人

简单的jsp中文乱码查了很多文章还

发布时间: 2012-03-17 19:06:28 作者: rapoo

简单的jsp中文乱码,查了很多文章,还是不行啊



环境:Netbeans5.5

查了很多文章,还是不行啊
把GB2312换成UTF-8业不行


<%@page contentType= "text/html "%>
<%@page pageEncoding= "GB2312 "%>

<head>
<meta http-equiv= "Content-Type " content= "text/html;charset=GB2312 ">
<title>
</tile>
</head>


<HTML>
<BODY>
</FONT> <FORM action= "1.jsp " method=post name=form>
性别:
<input name= "r1 " type= "radio " value= "男 "> 男


</BODY>
</HTML>

[解决办法]
<%@page contentType= "text/html;charset=gb2312 "%>

<head>
<meta http-equiv= "Content-Type " content= "text/html;charset=GB2312 ">
<title>
</tile>
</head>


<HTML>
<BODY>
</FONT> <FORM action= "1.jsp " method=post name=form>
性别:
<input name= "r1 " type= "radio " value= "男 "> 男


</BODY>
</HTML>

[解决办法]
1、刚才说的配消息资源文件
2、添加字符过滤器

读书人网 >Java Web开发

热点推荐