123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <%@ page import="com.kingdee.eas.cp.common.web.config.PortalXmlConfiguration"%>
- <%@ page import="com.kingdee.eas.portal.web.configuration.PortalConfig,
- com.kingdee.util.XMLConfiguration,
- com.kingdee.util.ConfigurationItem"%>
- <%
- try
- {
- String _jnlpParam_serverName = request.getServerName();
- if(_jnlpParam_serverName == null || "".equals(_jnlpParam_serverName) )
- {
- _jnlpParam_serverName = "localhost";
- }
-
- String _jnlpParam_serverPort = Integer.toString(request.getServerPort());
- if(_jnlpParam_serverPort == null || "".equals(_jnlpParam_serverPort) )
- {
- _jnlpParam_serverPort = "6888";
- }
- //web.xml config initparameter
- //String _jnlpWebSite = getServletConfig().getServletContext().getInitParameter("com.kingdee.eas.easAppletFramework.website") ;
- String _jnlpWebSite = PortalXmlConfiguration.getInstance().getEasWebClientConfigItem().getUrl() ;
- //if don't set in web.xml,set the same value as self jsp
- if(_jnlpWebSite == null || "".equals(_jnlpWebSite))
- {
- _jnlpWebSite = "http://" + _jnlpParam_serverName + ":" + _jnlpParam_serverPort ;
- }
- //String _jnlpPath = getServletConfig().getServletContext().getInitParameter("com.kingdee.eas.easAppletFramework.appletParameter.jnlpURL") ;
- String _jnlpPath = PortalXmlConfiguration.getInstance().getEasWebClientConfigItem().getJnlpUrl() ;
- //if don't set in web.xml,set default value
- if(_jnlpPath == null || "".equals(_jnlpPath))
- {
- _jnlpPath = "/easupdater/eas.jnlp" ;
- }
-
- String autoDownload = (String)session.getAttribute("autoDownload");
- if(autoDownload!=null && "true".equalsIgnoreCase(autoDownload)){
- autoDownload = "autoDownload=true";
- }else{
- autoDownload = "autoDownload=false";
- }
- if(_jnlpPath.indexOf("?")>-1){
- _jnlpPath = _jnlpPath + "&"+autoDownload;
- }else{
- _jnlpPath = _jnlpPath + "?"+autoDownload;
- }
- String _jnlpURL = _jnlpWebSite + _jnlpPath ;
- String _versionURL = _jnlpWebSite + "/easupdater/version.properties" ;
-
- //String _jnlpParamLocalDir = getServletConfig().getServletContext().getInitParameter("com.kingdee.eas.easAppletFramework.appletParameter.localDir") ;
- String _jnlpParamLocalDir = PortalXmlConfiguration.getInstance().getEasWebClientConfigItem().getLocalInstallDir() ;
-
- if(_jnlpParamLocalDir == null || "".equals(_jnlpParamLocalDir) )
- {
- _jnlpParamLocalDir = "c:\\kingdee\\eas4.1portal" ;
- }
-
- //append server IP
- _jnlpParamLocalDir = _jnlpParamLocalDir + "_" + _jnlpParam_serverName +"\\" ;
-
- ConfigurationItem configItem = PortalConfig.getConfiguration().getConfigItem("fileUpdate");
- String onceDownKBytes = configItem.getProperty("onceDownKBytes");
- String downloadMethod = configItem.getProperty("netFox");
- String totalTryCount = configItem.getProperty("totalTryCount");
-
- configItem = PortalConfig.getConfiguration().getConfigItem("debug");
- String debug = configItem.getProperty("debug");
- String easclienthome = configItem.getProperty("easclienthome");
- String metadatapath = configItem.getProperty("metadatapath");
- %>
- <PARAM name="jnlpURL" value="<%=_jnlpURL%>">
- <PARAM name="localDir" value="<%=_jnlpParamLocalDir%>">
- <PARAM name="versionURL" value="<%=_versionURL%>">
- <PARAM NAME = "onceDownKBytes" VALUE = "<%=onceDownKBytes%>">
- <PARAM NAME = "totalTryCount" VALUE = "<%=totalTryCount%>">
- <PARAM NAME = "downloadMethod" VALUE = "<%=downloadMethod%>">
- <PARAM NAME = "debug" VALUE = "<%=debug%>">
- <PARAM NAME = "easclienthome" VALUE = "<%=easclienthome%>">
- <PARAM NAME = "metadatapath" VALUE = "<%=metadatapath%>">
- <%
- }
- catch(Exception e)
- {
- System.err.println("[EAS Portal] set applet jnlp param fail.");
- }
- %>
|