FileDocCategorySizeDatePackage
NileItem.javaAPI DocExample664Thu Apr 05 20:20:48 BST 2001None

NileItem

public class NileItem extends HttpServlet

Fields Summary
Constructors Summary
Methods Summary
public voiddoGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)


    // We do not set the content type

    PrintWriter out = res.getWriter();

    Book book = (Book) req.getAttribute("item");

    out.println("<BR>");
    if (book != null) {
      out.println("<I>" + book.getTitle() + "</I>");
      out.println(" by " + book.getAuthor());
    }
    else {
      out.println("<I>No book record found</I>");
    }
    out.println("<BR>");