sp.printHTML("Cannot lookup SB_SearchItemsByRegion: " +e+"<br>");
printError("Cannot lookup SB_SearchItemsByRegion: " +e+"<br>");
  private void itemList(Integer categoryId, Integer regionId, int page, int nbOfItems)   {    // Connecting to Home thru JNDI    SB_SearchItemsByRegionHome home = null;    SB_SearchItemsByRegion sb_SearchItemsByRegion = null;    String list = "";    try     {      home = (SB_SearchItemsByRegionHome)PortableRemoteObject.narrow(initialContext.lookup("SB_SearchItemsByRegionHome"),                                                     SB_SearchItemsByRegionHome.class);      sb_SearchItemsByRegion = home.create();    }     catch (Exception e)    {      sp.printHTML("Cannot lookup SB_SearchItemsByRegion: " +e+"<br>");      return ;    }    try     {      list = sb_SearchItemsByRegion.getItems(categoryId, regionId, page, nbOfItems);    }     catch (Exception e)    {      sp.printHTML("Cannot get the list of items: " +e+"<br>");      return ;    }    try    {      if ((list != null) && (!list.equals("")))      {        sp.printItemHeader();        sp.printHTML(list);         sp.printItemFooter();      }      else      {        if (page == 0)          sp.printHTML("<h3>Sorry, but there is no items in this category for this region.</h3><br>");        else        {          sp.printHTML("<h3>Sorry, but there is no more items in this category for this region.</h3><br>");          sp.printItemHeader();          sp.printItemFooter("<a href=\"/servlet/edu.rice.rubis.beans.servlets.SearchItemsByRegion?category="+categoryId+                             "&region="+regionId+"&page="+(page-1)+"&nbOfItems="+nbOfItems+"\">Previous page</a>", "");        }        return ;      }      if (page == 0)        sp.printItemFooter("", "<a href=\"/servlet/edu.rice.rubis.beans.servlets.SearchItemsByRegion?category="+categoryId+                           "&region="+regionId+"&page="+(page+1)+"&nbOfItems="+nbOfItems+"\">Next page</a>");      else        sp.printItemFooter("<a href=\"/servlet/edu.rice.rubis.beans.servlets.SearchItemsByRegion?category="+categoryId+                           "&region="+regionId+"&page="+(page-1)+"&nbOfItems="+nbOfItems+"\">Previous page</a>",                           "<a href=\"/servlet/edu.rice.rubis.beans.servlets.SearchItemsByRegion?category="+categoryId+                           "&region="+regionId+"&page="+(page+1)+"&nbOfItems="+nbOfItems+"\">Next page</a>");    }     catch (Exception e)     {      sp.printHTML("Exception getting item list: " + e +"<br>");    }  }