Class DrillServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
me.nickhanson.codeforge.web.DrillServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

@WebServlet(urlPatterns={"/drill","/drill/*"}) public class DrillServlet extends jakarta.servlet.http.HttpServlet
Servlet handling drill-related operations, including displaying the drill queue, serving challenges for drilling, and processing challenge submissions. Supports URLs under /drill and /drill/*.
Author:
Nick Hanson
See Also:
  • Field Summary

    Fields inherited from class jakarta.servlet.http.HttpServlet

    LEGACY_DO_HEAD
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp)
    Handles GET requests for the drill queue and individual challenges.
    protected void
    doPost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp)
    Handles POST requests for submitting challenge solutions and adding challenges to the drill queue.
    void
     

    Methods inherited from class jakarta.servlet.http.HttpServlet

    doDelete, doHead, doOptions, doPut, doTrace, getLastModified, init, service, service

    Methods inherited from class jakarta.servlet.GenericServlet

    destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DrillServlet

      public DrillServlet()
  • Method Details

    • init

      public void init()
      Overrides:
      init in class jakarta.servlet.GenericServlet
    • doGet

      protected void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws jakarta.servlet.ServletException, IOException
      Handles GET requests for the drill queue and individual challenges.
      Overrides:
      doGet in class jakarta.servlet.http.HttpServlet
      Parameters:
      req - the HttpServletRequest object
      resp - the HttpServletResponse object
      Throws:
      jakarta.servlet.ServletException - the servlet exception
      IOException - the IO exception
    • doPost

      protected void doPost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws IOException
      Handles POST requests for submitting challenge solutions and adding challenges to the drill queue.
      Overrides:
      doPost in class jakarta.servlet.http.HttpServlet
      Parameters:
      req - the HttpServletRequest
      resp - the HttpServletResponse
      Throws:
      IOException - if an I/O operation fails