@Override
 protected void service(HttpServletRequest req, HttpServletResponse resp)
     throws ServletException, IOException {
   String reqMethod = req.getMethod();
   if (reqMethod.equals("GET") || reqMethod.equals("POST")) {
     super.service(req, resp);
   } else {
     resp.setStatus(405); // Method Not Allowed
   }
 }
 @Override
 public void destroy() {
   super.destroy();
 }
 @Override
 public void init() throws ServletException {
   super.init();
 }