<%-- IBM Confidential OCO Source Material --%> <%-- 5724-i63, 5724-H88 (C) COPYRIGHT International Business Machines Corp. 1997, 2004 --%> <%-- The source code for this program is not published or otherwise divested --%> <%-- of its trade secrets, irrespective of what has been deposited with the --%> <%-- U.S. Copyright Office. --%> <%@ page import="java.util.*,java.util.regex.*,org.apache.struts.util.MessageResources,org.apache.struts.action.Action"%> <% //Insert the override CSS if (session.getAttribute("isFederated") != null) { %>" rel="stylesheet" type="text/css"/><% } %> <%@ page import="com.ibm.ws.console.core.WSCDefines" %> <% //WSC Console Federation Boolean federated = (Boolean)request.getSession().getAttribute(WSCDefines.WSC_ISC_LAUNCHED_TASK); if ( federated == null) { federated = new Boolean(false); } Boolean isPortletCompatible = (Boolean)request.getSession().getAttribute(WSCDefines.PORTLET_COMPATIBLE); if(isPortletCompatible == null){ isPortletCompatible = new Boolean(false); } %> <% String[] langarray = { "de","en","es","fr","it","ja","ko","pt","zh-cn", "zh-tw" }; boolean isDBCS = false; double multiplierWildCard = 1.0; double multiplier = 0.7; double spacer = 1.0; String browserPlatform = ""; double browserPlatformM = 1.0; String browserJava = ""; double browserJavaM = 1.0; String browserLocale = ""; double browserLocaleM = 1.0; String theagent = request.getHeader("USER-AGENT"); if(theagent!=null) theagent = theagent.toLowerCase(); String thelocale = ""; if (request.getHeader("ACCEPT-LANGUAGE")==null) { thelocale = "en"; } else { thelocale = request.getHeader("ACCEPT-LANGUAGE").toLowerCase(); } //session.setAttribute("multiplier", new Double(multiplier)); // New jdk 1.4 Regular Expressions Pattern pattern = Pattern.compile(","); String[] theirlangs = pattern.split(thelocale); // split //Matcher mat = pattern.matcher(input); //String jdkMatchResult = mat.find(); // match //String mat.replaceAll("-"); // substitute all occurrences //RE splitter = new RE(","); //String[] theirlangs = splitter.split(thelocale); int theirlen = theirlangs.length; int ourlangs = langarray.length; String currlang = ""; for (int y=0; y -1) { currlang = currlang.substring(0,weight).trim(); } int country = currlang.indexOf("-"); if ((country > -1) && (currlang.indexOf("zh") < 0)) { currlang = currlang.substring(0,country).trim(); } for (int z=0; z <% if (null != theagent && -1 != theagent.indexOf("windows")) { browserPlatform = "NT"; browserPlatformM = 1.0; } else if (null != theagent && -1 != theagent.indexOf("aix")) { browserPlatform = "AIX"; browserPlatformM = 1.2; } else if (null != theagent && -1 != theagent.indexOf("sunos")) { browserPlatform = "SOLARIS"; browserPlatformM = 1.3; } else if (null != theagent && -1 != theagent.indexOf("linux")) { browserPlatform = "LINUX"; browserPlatformM = 1.2; } else if (null != theagent && -1 != theagent.indexOf("hp_ux")) { browserPlatform = "HP_UX"; browserPlatformM = 1.2; } else { browserPlatform = "NT"; browserPlatformM = 1.0; } %> <% if (null != theagent && -1 != theagent.indexOf("msie")) { browserJava = "IE"; browserJavaM = 1.0; } else if (null != theagent && -1 != theagent.indexOf("gecko")) { browserJava = "GECKO"; browserJavaM = 1.0; } else if (null != theagent && -1 != theagent.indexOf("opera")) { browserJava = "OPERA"; browserJavaM = 1.0; } else { browserJava = "NETSCAPE"; browserJavaM = 1.0; } %> <% if (browserLocale.equals("zh-cn")) { browserLocale = "zh"; browserLocaleM = 1.2; isDBCS = true; } else if (browserLocale.equals("zh-tw")) { browserLocale = "zh_TW"; browserLocaleM = 1.2; isDBCS = true; } else if (browserLocale.equals("fr")) { browserLocale = "fr"; browserLocaleM = 1.0; } else if (browserLocale.equals("de")) { browserLocale = "de"; browserLocaleM = 1.0; } else if (browserLocale.equals("en")) { browserLocale = "en"; browserLocaleM = 1.0; } else if (browserLocale.equals("it")) { browserLocale = "it"; browserLocaleM = 1.0; } else if (browserLocale.equals("ja")) { browserLocale = "ja"; browserLocaleM = 1.1; isDBCS = true; } else if (browserLocale.equals("ko")) { browserLocale = "ko"; browserLocaleM = 1.1; isDBCS = true; } else if (browserLocale.equals("pt")) { browserLocale = "pt"; browserLocaleM = 1.0; } else if (browserLocale.equals("es")) { browserLocale = "es"; browserLocaleM = 1.0; } else { browserLocale = "en"; browserLocaleM = 1.0; } %> <% multiplier = browserLocaleM * browserJavaM * browserPlatformM; session.setAttribute("multiplier", new Double(multiplier)); if (isDBCS) { spacer = 0.5; } %> <% // BEGIN Javascript Translated Text Variables String pleaseWait = "null"; String statusStarted = "null"; String statusStopped = "null"; String statusUnavailable = "null"; String statusUnknown = "null"; String statusPartialStart = "null"; String statusPartialStop = "null"; String statusSynchronized = "null"; String statusNotSynchronized = "null"; String moveInListError = "null"; String noInfoAvailable = "null"; String lookInPageHelp = "null"; String selectText = "null"; MessageResources statusMessages = (MessageResources)application.getAttribute(Action.MESSAGES_KEY); try { pleaseWait = statusMessages.getMessage(request.getLocale(),"trace.tree.pleaseWaitLabel"); } catch (Exception e) { } try { statusStarted = statusMessages.getMessage(request.getLocale(),"ExecutionState.STARTED"); } catch (Exception e) { } try { statusStopped = statusMessages.getMessage(request.getLocale(),"ExecutionState.STOPPED"); } catch (Exception e) { } try { statusUnavailable = statusMessages.getMessage(request.getLocale(),"ExecutionState.UNAVAILABLE"); } catch (Exception e) { } try { statusUnknown = statusMessages.getMessage(request.getLocale(),"ExecutionState.UNKNOWN"); } catch (Exception e) { } try { statusPartialStart = statusMessages.getMessage(request.getLocale(),"ExecutionState.PARTIAL_START"); } catch (Exception e) { } try { statusPartialStop = statusMessages.getMessage(request.getLocale(),"ExecutionState.PARTIAL_STOP"); } catch (Exception e) { } try { statusSynchronized = statusMessages.getMessage(request.getLocale(),"Node.synchronized"); } catch (Exception e) { } try { statusNotSynchronized = statusMessages.getMessage(request.getLocale(),"Node.not.synchronized"); } catch (Exception e) { } try { moveInListError = statusMessages.getMessage(request.getLocale(),"move.in.list.error"); } catch (Exception e) { } try { noInfoAvailable = statusMessages.getMessage(request.getLocale(),"wsc.field.help.noinfo"); } catch (Exception e) { } try { lookInPageHelp = statusMessages.getMessage(request.getLocale(),"wsc.field.help.lookin.page"); } catch (Exception e) { } try { selectText = statusMessages.getMessage(request.getLocale(),"select.text"); } catch (Exception e) { } %>