from提交的数据到后台是乱码

请高手帮忙,在火狐浏览器插入中文没有问题,在遨游或IE就出现乱码,应该怎么解决,我
google了半天没找到
这是ext:
//----- new a simple sendMsgPanel --------------------创建一个发送消息的面板---------------
var sendMsgPanel= new Ext.form.FormPanel({
id:'1101-panel',
title:'发送新消息',
labelWidth:200,
frame:true,
// autoHeight:true,
buttonAlign:'center',
items:[{
xtype:'textfield',
fieldLabel:'<a href="#" οnclick="javascript:recivers();">接收人</a>',
id:'reciver',
allowBlank:false,
width:500
},{
xtype:'textfield',
fieldLabel:'标题',
id:'caption',
allowBlank:false,
width:500
},{
xtype:'textfield',
fieldLabel:'内容',
id:'msg',
allowBlank:false,
width:500,
height:400
}],
buttons:[
{
text:'发送',
handler:function(){
var f = sendMsgPanel.getForm();
if(f.isValid()){
f.submit({
url:'manager.do?command=sendPersonMsg',

success:function(form,action){
if(false==action.result.checkRec){
Ext.Msg.alert('消息', "对不起,此用户不存在,请输入正确的用户!");
return;
}
if(true==action.result.insertMsgOK){
Ext.Msg.alert('消息', "发送消息成功");
Ext.getCmp('content-panel').layout.setActiveItem('1102-panel');
recPersonStore.reload();
}else{
Ext.Msg.alert('消息', "插入数据失败");
}
},failure:function(){
Ext.Msg.alert('消息', "服务器没有连接!!");
}
});
}
}
},{
text:'取消',
handler:function(){
sendMsgPanel.getForm().reset();
}
}
]

});


这是后台:
}else if("sendPersonMsg".equals(command)){
JSONObject json= new JSONObject();
boolean check=false;
String title=null;
String msg = null;

title = (String)request.getParameter("caption");
msg = (String)request.getParameter("msg");


String editor = (String)request.getSession().getAttribute("who");
String reciver = (String)request.getParameter("reciver");
String[] name =new test3().splitName(reciver);
try {
for(int i=0;i<name.length;i++){
if(name.length==1){
boolean checkRec = new ProcessDAO().checkRec(name[0]); //检查用户是否存在
if(false==checkRec){
json.put("checkRec", false);
json.put("success", true);
out.println(json);
return null;
}
}
check = new ProcessDAO().sendPersonMsg(title,msg,editor,name[i]);
}

json.put("insertMsgOK",check);
json.put("success",true);
out.print(json);
} catch (JSONException e) {
e.printStackTrace();
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值