public static int get() {
// initialize the classes that can be searched for
classMappings = new HashMap(6);
classMappings.put("org.apache.jasper.runtime.JspFactoryImpl", new Integer(TOMCAT));
classMappings.put("com.caucho.jsp.JspServlet", new Integer(RESIN));
classMappings.put("com.evermind.server.http.JSPServlet", new Integer(ORION));
classMappings.put("weblogic.servlet.JSPServlet", new Integer(WEBLOGIC));
classMappings.put("com.hp.mwlabs.j2ee.containers.servlet.jsp.JspServlet", new Integer(HPAS));
classMappings.put("jrun.servlet.WebApplicationService", new Integer(JRUN));
classMappings.put("com.ibm.ws.webcontainer.jsp.servlet.JspServlet", new Integer(WEBSPHERE));
if (result == -1) {
final String classMatch = searchForClosestClass(classMappings);
if (classMatch == null) {
result = UNKNOWN;
}
else {
result = ((Integer) classMappings.get(classMatch)).intValue();
}
}
return result;
}
Get the current container. |