「Java入門」HttpServletを継承するサンプルコード

Javaコード:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public abstract class BaseServlet extends HttpServlet {
static final String SCH_ID = “schId”;

public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {

doPost(request, response);
}

public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {

//some code

doService(request, response);
}
abstract public void doService(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException;
/**
* リクエストされたパラメータ
*
* @param request a HttpServletRequest value
* @return an int value
*/
int getSchId(HttpServletRequest request) {
String strSch = (String)request.getParameter(SCH_ID);
return Integer.parseInt(strSch);
}
}