sp.printHTML("Cannot get the html form: " +e+"<br>");
printError("Cannot get the html form: " +e+"<br>");
  public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException  {    String toStr = request.getParameter("to");    String itemStr = request.getParameter("itemId");    String username = request.getParameter("nickname");    String password = request.getParameter("password");    sp = new ServletPrinter(response, "PubComment");        if ((toStr == null) || (toStr.equals("")) ||        (itemStr == null) || (itemStr.equals(""))||        (username == null) || (username.equals(""))||        (password == null) || (password.equals("")))    {      printError("User id, name and password are required - Cannot process the request<br>");      return ;    }    Context initialContext = null;    try    {      initialContext = new InitialContext();    }     catch (Exception e)     {      printError("Cannot get initial context for JNDI: " + e+"<br>");      return ;    }    // Connecting to Home thru JNDI    SB_PutCommentHome home = null;    SB_PutComment sb_PutComment = null;    Integer toId = new Integer(toStr);    Integer itemId = new Integer(itemStr);    try     {      home = (SB_PutCommentHome)PortableRemoteObject.narrow(initialContext.lookup("SB_PutCommentHome"),                                                     SB_PutCommentHome.class);      sb_PutComment = home.create();    }     catch (Exception e)    {      sp.printHTML("Cannot lookup SB_PutComment: " +e+"<br>");      return ;    }    String html;    // Display the comment form    try     {      sp.printHTMLheader("RUBiS: Comment service");      html = sb_PutComment.getCommentForm(itemId, toId, username, password);      sp.printHTML(html);      sp.printHTML("<tr><td><b>Rating</b>\n"+                   "<td><SELECT name=rating>\n"+                   "<OPTION value=\"5\">Excellent</OPTION>\n"+                   "<OPTION value=\"3\">Average</OPTION>\n"+                   "<OPTION selected value=\"0\">Neutral</OPTION>\n"+                   "<OPTION value=\"-3\">Below average</OPTION>\n"+                   "<OPTION value=\"-5\">Bad</OPTION>\n"+                   "</SELECT></table><p><br>\n"+                   "<TEXTAREA rows=\"20\" cols=\"80\" name=\"comment\">Write your comment here</TEXTAREA><br><p>\n"+                   "<input type=submit value=\"Post this comment now!\"></center><p>\n");      sp.printHTMLfooter();    }     catch (Exception e)    {      sp.printHTML("Cannot get the html form: " +e+"<br>");      return ;    }  }