分析:
第一步:導入globle.jsp頁面。該頁面定義了SpringSide框架和一些系統全部變量例如:當前登錄用戶、weburl路徑、商家平臺還是坐席平臺
<%@ include file="/common/globle.jsp" %>
第二步:在jsp頁面利用el表達式取出系統全局裏面的變量
{ display: 'logo圖', name: 'logo', minWidth: 50 ,render:function(row){
if(row.logo!=null&&row.logo!=""){
return "<img src='${webUrl}"+row.logo+"' border='0'/>";[d1]
}else{
return "";
}
}
},
第三步:在bloble.jsp裏面存值
<%@ page import="com.xyz.callcenter.entity.system.SysUser"%>
<%@ page import="com.xyz.callcenter.service.system.SysConfigManager"%>
<%@ page import="com.xyz.callcenter.service.system.OperatorDetails"%>
<%@ page import="com.xyz.callcenter.utils.StringValueUtils"%>
<%@ page import="org.springside.modules.security.springsecurity.SpringSecurityUtils" %>
<%
//current user id
long currUserId=0;
OperatorDetails userDetails=SpringSecurityUtils.getCurrentUser();
SysUser currUser=userDetails.getSysuser();
currUserId=currUser.getUserid();
//web pre url address
String webUrl=
SysConfigManager.getInstance().getProperty("/callcenter/modules/module[@id=1]/Parameter[@id=5]/value[d2] ");
request.setAttribute("webUrl",webUrl[d3] );
//systype vari
int sysType=SysConfigManager.getInstance().getSysType();
request.setAttribute("systype",""+sysType);
%>
第四步:到CallCenterConfig.xml配置文件中,配置獲取logo圖的路徑
<modules>
<!-- 系統管理模塊配置 id:以便統一管理-->
<module id="1" name="系統管理">
<Parameter id="5" isshow="true">
<name>Web服務器地址</name>
<description>
Web服務器地址、用於訪問圖片、附件
</description>
<value>http://192.168.185.29:90</value>[d4]
</Parameter>
</module>
<module id="2" name="坐席業務">
</module>
</modules>