web.xml已经被修改了.建议加mime解析至于乱码问题是你字符集转换问题.ISO8859-1和gb2312的问题.
对数据库不要编码,显示时:
public String outStr(String strValue)
{
try
{
String strBuffer=strValue;
byte[] byteBuffer=strBuffer.getBytes("ISO8859-1");
String strReturn=new String(byteBuffer,"gb2312");
return strReturn;
}
catch(Exception e)
{
return null;
}
}
对数据库不要编码,显示时:
public String outStr(String strValue)
{
try
{
String strBuffer=strValue;
byte[] byteBuffer=strBuffer.getBytes("ISO8859-1");
String strReturn=new String(byteBuffer,"gb2312");
return strReturn;
}
catch(Exception e)
{
return null;
}
}
用楼上的方法转码应该就没问题了
记得在request时,除了trim()外,还要STR()一下,如:
User_Password=request.getParameter("password").trim();
User_Password=kk.ex_chinese(User_Password);
if(str==null){
str ="" ;
}
else{
try {
str = new String(str.getBytes("iso-8859-1"),"gb2312") ;
}
catch (Exception ex) {
}
}
return str ;
}
招聘网页编程人员(1-2名)
1-2年的网页编程经验
语言:JSP,java,html,javascript
请在简历中写明对以上语言的掌握程度以及学历.北京友联创新系统集成有限公司
联系方式:
010-62984859-8010王先生
[email protected]