sp.printHTML("Cannot lookup SB_BrowseCategories: " +e+"<br>");
printError("Cannot lookup SB_BrowseCategories: " +e+"<br>");
  public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException  {    String  region;    String  username=null, password=null;    Context initialContext = null;    sp = new ServletPrinter(response, "BrowseCategories");    sp.printHTMLheader("RUBiS available categories");    sp.printHTML("<h2>Currently available categories</h2><br>");    try    {      initialContext = new InitialContext();    }     catch (Exception e)     {      sp.printHTML("Cannot get initial context for JNDI: " +e+"<br>");      return ;    }    region = request.getParameter("region");    username = request.getParameter("nickname");    password = request.getParameter("password");        // Connecting to Home thru JNDI    SB_BrowseCategoriesHome home = null;    SB_BrowseCategories sb_browseCategories = null;    try     {      home = (SB_BrowseCategoriesHome)PortableRemoteObject.narrow(initialContext.lookup("SB_BrowseCategoriesHome"),                                                     SB_BrowseCategoriesHome.class);      sb_browseCategories = home.create();    }     catch (Exception e)    {      sp.printHTML("Cannot lookup SB_BrowseCategories: " +e+"<br>");      return ;    }    String list;    try     {      list = sb_browseCategories.getCategories(region, username, password);    }     catch (Exception e)    {      sp.printHTML("Cannot get the list of categories: " +e+"<br>");      return ;    }    sp.printHTML(list); 	    sp.printHTMLfooter();  }