code: @Override
      public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
  
          currentRequest.set(req);
          try {
  
              // check to OpenCms runlevel
              int runlevel = OpenCmsCore.getInstance().getRunLevel();
  
              // write OpenCms server identification in the response header
              res.setHeader(CmsRequestUtil.HEADER_SERVER, OpenCmsCore.getInstance().getSystemInfo().getVersion());
  
              if (runlevel != OpenCms.RUNLEVEL_4_SERVLET_ACCESS) {
                  // not the "normal" servlet runlevel
                  if (runlevel == OpenCms.RUNLEVEL_3_SHELL_ACCESS) {
                      // we have shell runlevel only, upgrade to servlet runlevel (required after setup wizard)
                      init(getServletConfig());
                  } else {
                      // illegal runlevel, we can't process requests
                      // sending status code 403, indicating the server understood the request but refused to fulfill it
                      res.sendError(HttpServletResponse.SC_FORBIDDEN);
                      // goodbye
                      return;
                  }
              }
  
              String path = OpenCmsCore.getInstance().getPathInfo(req);
              if (path.startsWith(HANDLE_PATH)) {
                  // this is a request to an OpenCms handler URI
                  invokeHandler(req, res);
              } else if (path.endsWith(HANDLE_GWT)) {
                  // handle GWT rpc services
                  String serviceName = CmsResource.getName(path);
                  serviceName = serviceName.substring(0, serviceName.length() - HANDLE_GWT.length());
                  OpenCmsCore.getInstance().invokeGwtService(serviceName, req, res, getServletConfig());
              } else {
                  // standard request to a URI in the OpenCms VFS
                  OpenCmsCore.getInstance().showResource(req, res);
              }
          } finally {
              currentRequest.remove();
          }
      }
docs: OpenCms servlet main request handling method.<p>
  
  @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)