<%@ page language="java" contentType="text/html; charset=gbk"
pageEncoding="gbk"%>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
pageEncoding="gbk"%>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
提交的方式是post还是get?get方式的话可以在配制文件中改,
你的action是不是编码了?
request.setCharacterEncoding("gb2312");
你试一试吧
发表地址:请点
在我的日志里,有问题请提问
发表地址:请点
在我的日志里,有问题请提问
写个类:
public String convert(String str)
{
byte newstr[] = new byte[str.length()];
for(int i = 0; i < str.length(); i++)
{
newstr[i] = (byte)str.charAt(i);
} return new String(newstr);
}
页面调用就可以了!
Str str = new Str();
str.convert(request.getParameter("内容"));