Package me.nickhanson.codeforge.web
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) Handles GET requests for the drill queue and individual challenges.protected voiddoPost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) Handles POST requests for submitting challenge solutions and adding challenges to the drill queue.voidinit()Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, init, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
-
Constructor Details
-
DrillServlet
public DrillServlet()
-
-
Method Details
-
init
public void init()- Overrides:
initin classjakarta.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:
doGetin classjakarta.servlet.http.HttpServlet- Parameters:
req- the HttpServletRequest objectresp- the HttpServletResponse object- Throws:
jakarta.servlet.ServletException- the servlet exceptionIOException- 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:
doPostin classjakarta.servlet.http.HttpServlet- Parameters:
req- the HttpServletRequestresp- the HttpServletResponse- Throws:
IOException- if an I/O operation fails
-