<%@ page contentType="text/html; charset=UTF-8" %> <%@page import="java.net.*"%> <%@page import="java.util.*" %> <%@page import="java.text.*" %> <%@page import="com.wacker.gsasearch.*" %> <%@page import="com.wacker.web.wacacademy.*"%> <%@page import="com.wacker.ws.*"%> <%@ page import="net.sf.gsaapi.*" %> <%@page import="java.io.UnsupportedEncodingException" %> <%@page import="com.wacker.solrsearch.*" %> <%@page import="org.owasp.encoder.Encode" %> <%! /** * Recode a String to the given encoding. * * @param s String String to recode. * @return recoded String, if encoding is valid; unmodified String, * otherwise. */ private String recode(String s) { return recode(s, "ISO-8859-1", "UTF-8"); } /** * Recode a String from the source to the target encoding. * * @param s String String to recode. * @param sourceEncoding String encoding to use for decoding. * @param targetEncoding String encoding to use for encoding. * @return recoded String, if encoding is valid; unmodified String, * otherwise. */ private String recode(String s, String sourceEncoding, String targetEncoding) { String result = (s == null) ? "" : s; try { result = new String(result.getBytes(sourceEncoding), targetEncoding); } catch (UnsupportedEncodingException e) { // do nothing, as the given String will be returned unmodified. } return result; } %> Dear visitor, - Wacker Chemie AG <%@page import="com.wacker.mdm.base.*"%> <% String language_loc = "DE"; String language_country_loc; String meta_geo = new String(); if(language_loc.equals("EN")){ language_country_loc = "US"; }else if(language_loc.equals("CN")){ language_country_loc = "CN"; language_loc = "ZH"; }else if(language_loc.equals("DE")){ language_country_loc = "DE"; }else{ language_loc = "EN"; language_country_loc = "US"; } Cookie[] cookies_loc = request.getCookies(); int flag = 0; if (cookies_loc != null) { for ( int i=0;i<(cookies_loc.length);i++) { Cookie thisCookie = cookies_loc[i]; if (thisCookie.getName().equals("geocountry")) { flag = 1; meta_geo = thisCookie.getValue(); } } } String ip_loc = request.getRemoteAddr(); MDMHelper mh_loc = null; long ipx_loc = 0; String land_loc = new String(); Locale locale_loc = new Locale(language_loc, language_country_loc, ""); Cookie locCookie = null; String cdn_country = request.getHeader("X-Country"); if(flag == 0) { if(cdn_country != null) { land_loc = cdn_country; } else { ipx_loc = mh_loc.get_ipx(ip_loc); land_loc = mh_loc.get_country(ipx_loc, locale_loc, true); } meta_geo = land_loc; locCookie = new Cookie("geocountry", land_loc); locCookie.setPath("/"); response.addCookie(locCookie); } if(cdn_country != null) { out.println(""); } else { out.println(""); } String real_IP = request.getHeader("X-Forwarded-For"); if(real_IP !=null) { if(real_IP.contains("193.18.240.18") || real_IP.contains("193.18.92.162") || real_IP.contains("193.18.191.162")){ out.println(""); } else { out.println(""); } } else { out.println(""); } %> <% // url whitelist parameter ArrayList urlWhitelistParameter = new ArrayList(); urlWhitelistParameter.add("application"); urlWhitelistParameter.add("applicationId"); urlWhitelistParameter.add("country"); urlWhitelistParameter.add("firstLevelId"); urlWhitelistParameter.add("i"); urlWhitelistParameter.add("mAttribute"); urlWhitelistParameter.add("product"); urlWhitelistParameter.add("productGroup"); urlWhitelistParameter.add("productGroupId"); urlWhitelistParameter.add("productType"); urlWhitelistParameter.add("secondLevelId"); urlWhitelistParameter.add("seminarart"); urlWhitelistParameter.add("seminarid"); urlWhitelistParameter.add("seminarindustry"); urlWhitelistParameter.add("seminarlanguage"); urlWhitelistParameter.add("seminarregion"); urlWhitelistParameter.add("seminartyp"); urlWhitelistParameter.add("thirdLevelId"); urlWhitelistParameter.add("trademarkId"); // get url parameter Map map = request.getParameterMap(); // iterate over map and add to new param string String params = ""; Iterator it = map.keySet().iterator(); while (it.hasNext()) { String key = (String) it.next(); String[] value = (String[])map.get(key); if(urlWhitelistParameter.contains(key)) { params += key + "=" + value[0] + "&"; } } // create canonical url String canonicalUrl = request.getRequestURL().toString(); if(!params.isEmpty()){ //canonicalUrl += "?" + params.substring(0,params.length()-1); canonicalUrl += "?" + URLEncoder.encode(params.substring(0,params.length()-1), "UTF-8"); } %> <% String headline = new String(); String queryword = new String(); String allowedCountries = new String(); queryword = null; headline = null; int searchcount = 0; String qP = new String(); String xtid = request.getParameter("xtid"); String s_tid = new String(); String cookieNameOMC = "xtid"; Cookie cookiesOMC [] = request.getCookies (); Cookie myCookieOMC = null; if(xtid != null) { request.getSession().setAttribute("xtid",xtid); s_tid = xtid; Cookie cookieOMC = new Cookie ("xtid",xtid); cookieOMC.setPath("/"); cookieOMC.setMaxAge(365 * 24 * 60 * 60); response.addCookie(cookieOMC); } else { s_tid = (String) request.getSession().getAttribute("xtid"); if(s_tid == null) { s_tid = ""; if (cookiesOMC != null) { for (int i = 0; i < cookiesOMC.length; i++) { if (cookiesOMC[i].getName().equals(cookieNameOMC)) { myCookieOMC = cookiesOMC[i]; s_tid = myCookieOMC.getValue(); break; } } } else { s_tid = ""; } } else { Cookie cookieOMC = new Cookie ("xtid",s_tid); cookieOMC.setPath("/"); cookieOMC.setMaxAge(365 * 24 * 60 * 60); response.addCookie(cookieOMC); } } %>

Dear visitor, - Wacker Chemie AG


<% String showTracking = request.getParameter("showTracking"); %> <% if(showTracking==null) { %> <% } %> <% if(showTracking==null) { %> <% } %>