PK z: META-INF/ PK z:ef f META-INF/MANIFEST.MFManifest-Version: 1.0 Ant-Version: Apache Ant 1.7.1 Created-By: 10.0-b22 (Sun Microsystems Inc.) PK z: WEB-INF/PK z: WEB-INF/classes/PK z: WEB-INF/classes/com/PK z:璹 JNDIbrowser.jsp<%@page import="javax.naming.*, javax.sql.*, java.sql.*"%> <%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> <%! static public String DEF_CPATH = "jdbc/";%> <% //String contextPath = "java:comp/env/jdbc"; //String contextPath = request.getParameter("cpath"); String contextPath = null; if (contextPath == null) { contextPath = DEF_CPATH; }%>
Context looked up: <%= contextPath%>
<% InitialContext initCtx; Context envCtx; NamingEnumeration enum1 = null; int i = 0; try { initCtx = new InitialContext(); if ((envCtx = (Context) initCtx.lookup(contextPath)) == null) { out.println("No " + contextPath + " context
"); } else { enum1 = initCtx.listBindings(contextPath); i = 1; } } catch (javax.naming.NamingException ex) { } catch (java.lang.NullPointerException ex) { out.println(ex); } %><%= i%> | <%= ((Binding) enum1.next()).toString()%> |