只需向下面那样使用即可(<%! public String paramToString(){...}%>)
<%
String serviceCode=paramToString(request,"serviceCode");//服务编码
if(serviceCode!=null&&!serviceCode.trim().equals("")){
//组合对象,需要发送的消息
//serviceCode="SC00010300";
//String orgCode="0200";//机构号
//String frontOperator="0000000055";//柜员号
//String serialNumber="Flow0101";//前台流水号
String orgCode=paramToString(request,"orgCode");//机构号
String frontOperator=paramToString(request,"frontOperator");//柜员号
String serialNumber=paramToString(request,"serialNumber");//前台流水号
MessageQueryBean msgQueryBean = new MessageQueryBean();
msgQueryBean.setFrontOperator(frontOperator);
//String outType="notice";//输出类型
//msgQueryBean.setMsgType(outType);
msgQueryBean.setSerialNumber(serialNumber);
msgQueryBean.setOrgCode(orgCode);
msgQueryBean.setServiceCode(serviceCode);
//把参数值加入到map中,后台会进行校检(根据map的key值与数据库中的keyname字段的值进行检查)
Map dataMap=new HashMap();
//String keyName="senarioNo";
//String keyValue="SC00010301";
String keyName=paramToString(request,"keyName");
String keyValue=paramToString(request,"keyValue");
dataMap.put(keyName,keyValue);
MessageManagerServiceImpl message=new MessageManagerServiceImpl();
message.sendMessage(msgQueryBean, dataMap, new String[]{MsgConstants.MESSAGE_OUTTYPE_NOTICE+"="+MsgConstants.MESSAGE_MSGTYPE_CANCELACCOUNT+";",MsgConstants.MESSAGE_OUTTYPE_PRINT+"="+MsgConstants.MESSAGE_MSGTYPE_FRONTBUSINESS,MsgConstants.MESSAGE_OUTTYPE_MIDDLEDATA+"="+MsgConstants.MESSAGE_MSGTYPE_FRONTBUSINESS});
}
%>
<%! public String paramToString(HttpServletRequest request,String name){
if(request==null||name==null||name.trim()==""){
return "";
}
String result=request.getParameter(name)==null?"":request.getParameter(name).toString();
return result;
}
%>