@@ -0,0 +1,2119 @@
+package haushaltsbuch.web;%0A%0Aimport java.io.IOException;%0Aimport java.io.PrintWriter;%0Aimport javax.naming.Binding;%0Aimport javax.naming.Context;%0Aimport javax.naming.InitialContext;%0Aimport javax.naming.NamingEnumeration;%0Aimport javax.naming.NamingException;%0Aimport javax.servlet.ServletException;%0Aimport javax.servlet.annotation.WebServlet;%0Aimport javax.servlet.http.HttpServlet;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0A@WebServlet(%22/jndi%22)%0Apublic class JndiBrowserServlet extends HttpServlet%0A%7B%0A  private static final long serialVersionUID = 1L;%0A%0A  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException%0A  %7B%0A    PrintWriter writer = response.getWriter();%0A    writer.println(%22%3Cpre%3E%22);%0A%0A    try%0A    %7B%0A      Context ctx = new InitialContext();%0A      printContext(ctx, %22%22, writer);%0A      ctx.close();%0A    %7D%0A    catch (NamingException e)%0A    %7B%0A      writer.println(e.getMessage());%0A    %7D%0A%0A    writer.println(%22%3C/pre%3E%22);%0A  %7D%0A%0A  private String indent(int depth)%0A  %7B%0A    StringBuffer result = new StringBuffer(depth);%0A%0A    for (int i = 0; i %3C depth; i++)%0A      result.append(%22 %22);%0A%0A    return result.toString();%0A  %7D%0A%0A  private void printContext(Context ctx, String name, PrintWriter writer)%0A  %7B%0A    printContext(ctx, name, writer, 0);%0A  %7D%0A%0A  private void printContext(Context ctx, String name, PrintWriter writer, int depth)%0A  %7B%0A    try%0A    %7B%0A      NamingEnumeration%3CBinding%3E en = ctx.listBindings(%22%22);%0A%0A      while (en != null && en.hasMoreElements())%0A      %7B%0A        Binding binding = en.next();%0A%0A        String path = name + (name.length() %3E 0 ? %22/%22 : %22%22) + binding.getName();%0A%0A        Object namedObject = binding.getObject();%0A%0A        if (namedObject instanceof Context)%0A          printContext((Context) namedObject, path, writer, depth + 1);%0A        else%0A        %7B%0A          writer.println(path);%0A          writer.println(indent(depth) + namedObject.toString() + %22 (%22 + binding.getClassName() + %22)%22);%0A        %7D%0A      %7D%0A    %7D%0A    catch (NamingException e)%0A    %7B%0A      writer.println(e.getMessage());%0A    %7D%0A  %7D%0A%7D%0A

Add simple JDNI browser