建议你到FAQ里面看看,那里有全面的乱码解决方案
在接受参数的页面加入如下代码,然后调用就行了
第一步:<%--转换来自Form中文输入用的函数,否则乱码--%>
<%!
public String getStr(String str) {
try {
String tempStr=str;
byte[] tempByte=tempStr.getBytes("ISO8859-1");
String temp=new String(tempByte);
return temp;
}catch (Exception e) {
return "error";
}
}
%>
第二步:<%=getStr(request.getParameter("你的变量"))%>就ok la