Class ErrorServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.eclipse.jgit.http.server.glue.ErrorServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

public class ErrorServlet extends jakarta.servlet.http.HttpServlet
Send a fixed status code to the client.
See Also:
  • Field Summary

    Fields inherited from class jakarta.servlet.http.HttpServlet

    LEGACY_DO_HEAD
  • Constructor Summary

    Constructors
    Constructor
    Description
    ErrorServlet(int status)
    Sends a specific status code.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse rsp)
     

    Methods inherited from class jakarta.servlet.http.HttpServlet

    doDelete, doHead, doOptions, doPatch, doPost, doPut, doTrace, getLastModified, init, isSensitiveHeader, service, service

    Methods inherited from class jakarta.servlet.GenericServlet

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

    Methods inherited from class java.lang.Object

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

    • ErrorServlet

      public ErrorServlet(int status)
      Sends a specific status code.
      Parameters:
      status - the HTTP status code to always send.
  • Method Details

    • doGet

      protected void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse rsp) throws jakarta.servlet.ServletException, IOException
      Overrides:
      doGet in class jakarta.servlet.http.HttpServlet
      Throws:
      jakarta.servlet.ServletException
      IOException