private void searchItems(ServletOutputStream out,
        HttpServletRequest request)
        throws IOException {

  String searchString=request.getParameter(
        "searchString");
  String text = "Click Item number
        for description and to place bid.";
  setTitle(out, "Search Results");
  try {
    addLine("&lt;BR>"+text, out);

//Look up Home interfaces
    AuctionItemHome ahome = (
        AuctionItemHome) ctx.lookup(
        "auctionitems");
    SearchHome shome=(
        SearchHome) ctx.lookup("search");

//Create remote interface for search Bean
    Search search=shome.create();
//Call search method and pass the search string
    Enumeration enum=(Enumeration)
        search.getMatchingItemsList(searchString);

    addLine("&lt;TABLE BORDER=1
        CELLPADDING=1 CELLSPACING=0>
      &lt;TR> &lt;TH>Item&lt;TH> &lt;TH>Summary&lt;TH>
      &lt;TH>Current High bid&lt;TH>
      &lt;TH>Number of bids&lt;TH>
      &lt;TH>Closing Date&lt;TH>&lt;TR>", out);

//Iterate through search results
    while ((enum != null) &&
        (enum.hasMoreElements())) {
      while(enum.hasMoreElements(in)) {

//Locate auction items
        AuctionItem ai=ahome.findByPrimaryKey((
          AuctionItemPK)enum.nextElement());
        displayLineItem(ai, out);
       }
     }
     addLine("&lt;TABLE>", out);
  } catch (Exception e) {
     addLine("AuctionServlet Search Items error",
        out);
     System.out.println("AuctionServlet <searchItems>:"+e);
  }
  out.flush();
}
