<%@ page errorPage="/error.jsp"%> <%@ taglib uri="/include/adrinclude.tld" prefix="jLib" %> <%@ page import = "java.util.*"%> <%@ page import = "java.net.*"%> <%@ page import = "com.adr.gabrielle.systemaccountmgr.SAM"%> <%@ page import="java.io.*,java.util.*,com.adr.util.*,com.adr.db.*,java.sql.*,com.adr.gabrielle.client.om.*" %> <% String filename = "com.adr.gabrielle.client.index.jsp"; try { Log.log(Log.Debug, "Entering : " + filename ); //Find the conf file path to determine which ADR system Class classConfiguration = getClass(); String sFullResource = ("/conf"); URL sUrl = classConfiguration.getResource(sFullResource); String sFilename = sUrl.toString(); Log.log(Log.Debug, "From URL : " + sUrl); Log.log(Log.Debug, "Configuration file path : " + sFilename); Log.log(Log.Debug, "Request URL: " + HttpUtils.getRequestURL(request)); //if (sFilename.indexOf("/adr5.0/classes/conf") != -1) -- for testing if (sFilename.indexOf("/ldap1/classes/conf") != -1) { String RequestUrl = HttpUtils.getRequestURL(request).toString(); if (RequestUrl.indexOf("prod.netratings.com") != -1) { Log.log(Log.Debug, "From Production load balancer ..."); response.sendRedirect("/include/include_login.jsp"); } else { Log.log(Log.Debug, "From production ..."); response.sendRedirect("http://www.netratings.com/login/sl_adr.htm"); } } else { Log.log(Log.Debug, "From Stage/Dev ..."); response.sendRedirect("/include/include_login.jsp"); } } catch(Exception e) { Log.log(Log.Debug, "Into this Exception at all? " + e); // Log in failed, do a redirect e.printStackTrace(new PrintWriter(out)); response.sendRedirect("/include/include_login.jsp"); } %>