关于《Core Servlet and JavaServer Pages》中的Servlet Life Cycle不太明白
这几个优点没有理解,望指点
If your servlet needs to handle both GET and POST identically, have your doPost method call doGet, or vice versa
Although this approach takes a couple of extra lines of code, it has several advantages over directly overriding service. First, you can later add support for other HTTP request methods by adding doPut, doTrace, etc., perhaps in a subclass. Overriding service directly precludes this possibility. Second, you can add support for modification dates by adding a getLastModified method, as illustrated in Listing 3.7. Since getLastModified is invoked by the default service method, overriding service eliminates this option. Finally, service gives you automatic support for HEAD, OPTION, and TRACE requests.