各位高手:我在JSP中是通过GET方式(超链接的方式)带一些数据到服务器的,为什么不能正常显示我的一些中文数据呢?(我有在JSP中设置gb2312的),是不是要在TOMCAT里要设置什么呀?
解决方案 »
- S2SH报错求助
- Axis2问题:The service cannot be found for the endpoint reference (EPR)
- java 数据字典如何使用?
- (关于加载配置文件)偶是Spring新手,做试验的时候遇到了点问题,请大虾们不吝赐教!
- 大家帮我看看我这段代码错误在哪里呢?
- 关于jboss部署的一个问题
- 在用Socket进行通讯时,输入与输出是不是不能同时进行?
- 在Struts的struts-config.xml中配置data-source的oracle连接?
- 报表查询打印的问题?!(讨论)!!!!!
- 十分活急!!请教用j2ee架构企业应用平台的方案,最好有系统设计方面的例子!!
- 急:一个webservice 问题
- AspectJ,如何一次性地给一个包下面所有的类的public方法加上log呢?
new String(request.getParameter("username").getBytes("iso-8859-1"), "gb2312")
public MyResquest(ServletRequest arg0) {
super((HttpServletRequest) arg0);
}
public String getParameter(String arg0) {
String x = super.getParameter(arg0);
if (getMethod().equalsIgnoreCase("GET") &&x!=null)
try {
x = new String(x.getBytes("iso8859-1"),"gbk");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return x;
}
的啊 这重写了getParameter 方法 可以直接用