September 2002
Intermediate to advanced
608 pages
14h 20m
English
In order to make our Standings class function as a servlet, there are just a few things we need to add to it. The first decision to make is what to base the new servlet on. We could extend our BasicStandingsImpl class, creating a new ServletStandingsImpl class that added the necessary servlet methods. Because Java doesn't support multiple inheritance, if we decide to subclass BasicStandingsImpl then we cannot also subclass one of the servlet classes (GenericServlet or HttpServlet), which means we would instead have to implement the Servlet interface. While this approach would be perfectly valid, we would rather leverage the service() method provided in the HttpServlet class that already takes care ...
Read now
Unlock full access