Package com.jk.web.servlets
Class JKErrorServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
com.jk.web.servlets.JKErrorServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet
,jakarta.servlet.ServletConfig
,Serializable
public class JKErrorServlet
extends jakarta.servlet.http.HttpServlet
This class is a servlet responsible for handling and displaying error pages
and exception details.
- Version:
- 1.0
- Author:
- Dr. Jalal H. Kiswani
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Represents the contents of the error page as XHTML.Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doGet
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) This method handles GET requests for error pages, displaying exception and error details.Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, init, service, service
Methods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Field Details
-
ERROR_PAGE_CONTENTS
Represents the contents of the error page as XHTML.
-
-
Constructor Details
-
JKErrorServlet
public JKErrorServlet()
-
-
Method Details
-
doGet
protected void doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException This method handles GET requests for error pages, displaying exception and error details.- Overrides:
doGet
in classjakarta.servlet.http.HttpServlet
- Parameters:
request
- Specifies theHttpServletRequest
for the error request.response
- Specifies theHttpServletResponse
for the error response.- Throws:
IOException
- if an input or output error is detected when the servlet handles the GET request.jakarta.servlet.ServletException
- if the request for the GET could not be handled.
-