anchor.diff:  <h3>Servlet Init parameters</h3>
   <table border="1">
   <TR valign=top>
  -    <TH align=left>Parameter:</TH>
  -    <TH align=left>Value:</TH>
  -</tr>
  -<%
  -        while(e.hasMoreElements()) {
  +    <th align=left>Parameter:</th>
  +    <th align=left>Value:</th>
  +</tr>
  +<%
  +        while (e.hasMoreElements()) {
               String k = (String) e.nextElement();
               String val = getServletConfig().getInitParameter(k);
   %>
  
positive.code: <%} catch (NamingException ex) {%>
      Nothing found at: <%=contextName%>
  <%}%>
            
          </td>
          <td>
    
  <% boolean jndiSuccess = false;
  String jndiName = (String)request.getParameter("jndiName");
    
  String message = "";
  if(jndiName != null && !"".equals(jndiName.trim())) {
      Connection conn = null;
      try {
          Context initCtx = new InitialContext();
          Context envCtx = (Context) initCtx.lookup("java:comp/env");
          if(envCtx!=null){
              DataSource ds = (DataSource)envCtx.lookup(jndiName);
              conn = ds.getConnection();
              if(conn != null) jndiSuccess = true;
              %>
  <table border="1">
  <tr>
  <TH>JDBC URL</TH>
  <td><%=conn.getMetaData().getURL() %> </td>
  </tr>        
  <tr>
  <TH>JDBC Username</TH>
  <td><%=conn.getMetaData().getUserName() %> </td>
  </tr>        
  <tr>
  <TH>Database </TH>
  <td><%=conn.getMetaData().getDatabaseProductName() %>
  <%=conn.getMetaData().getDatabaseProductVersion() %></td>
  </tr>        
  <tr>
  <TH>Driver</TH>
  <td><%=conn.getMetaData().getDriverName() %> <%=conn.getMetaData().getDriverVersion() %></td>
  </tr>        
  <tr>
  <TH>JDBC Version</TH>
  <td><%=conn.getMetaData().getJDBCMajorVersion() %> </td>
  </tr>
  <tr>
  <TH>JDBC Max Connections</TH>
  <td><%=conn.getMetaData().getMaxConnections() %> </td>
  </tr>        
                
  </table>
              <%          
          }
      } catch (Exception ex) {
          message = ex.getMessage();
      } finally {
          try{conn.close();}catch(Exception ex){}
      }
        
  }
  %>
    
  <form action="" method="GET">
  <p><label for="jndiName">DataSource JNDI Name: </label> <br/>
  java:comp/env/<input name="jndiName" type="text" value="<%=jndiName==null? "" : jndiName%>"></p>
  <p>
  <%if(jndiSuccess) {%>
  Connection Success!
  <%} else if (!"".equals(message)) {%>
  Connection failed with message: <%=message %>
  <%} %>
  </p>
  <p><input name="submit" type="submit" value="submit"></p>
  </form>
            
          </td>
      </tr>
  </table>
    
    
  <h3>JAX-WS</h3>
    
  <table border="1">
  <TR valign=top>
      <TH align=left>API</TH>
      <TH align=left>Sun Implementation</TH>
  </tr>
  <TR valign=top>
      <td>
  <%
      try {
          Class.forName("javax.jws.WebService");
          %>Present<%
      } catch (Exception ex) {
          %>Missing<%
      }
  %>  
      </td>
      <td>
  <%
      try {
          Class.forName("com.sun.istack.Builder");
          %>Present<%
      } catch (Exception ex) {
          %>Missing<%
      }
  %>  
      </td>
  </tr>
  </table>
    
  
  <h3>Classloader Query</h3>
  <p>The form below returns information about where a class is being served from.</p>
   
  <form action="#classLocation" method="GET">
  <p>
  <select name="className">
  <option value="java.lang.String">JDK CORE</option>
  <option value="org.springframework.context.ApplicationContext">spring-context</option>
  </select><input type="submit" value="Submit"/>
  <%
  String className = request.getParameter("className");
  URL location = null;
  if(className!=null) {
      Class klass = null;
      try {
      klass = Class.forName(className);
      location = klass.getResource('/'+klass.getName().replace('.','/')+".class");
      } catch(Exception ex) {}
  }
  %>
  <a id="classLocation"></a><%=location==null ? "Class Not Found in any JAR in classpath." : location%>
  </p>
  </form>
   
  
  </body>
  </html>
  
negative.code:   
  <%
      e = getServletConfig().getInitParameterNames();
      if (e != null && e.hasMoreElements()) {
  %>
  <h3>Context Init parameters</h3>
  <table border="1">
  <TR valign=top>
      <th align=left>Parameter:</th>
      <th align=left>Value:</th>
  </tr>
  <%
          while (e.hasMoreElements()) {
              String k = (String) e.nextElement();
              String val = getServletConfig().getInitParameter(k);
  %>
  