Class FourOhFourServlet
java.lang.Object
jakarta.servlet.GenericServlet
com.atlassian.confluence.impl.webapp.FourOhFourServlet
- All Implemented Interfaces:
- jakarta.servlet.Servlet,- jakarta.servlet.ServletConfig,- Serializable
public class FourOhFourServlet
extends jakarta.servlet.GenericServlet
Servlet that always returns a 404.
Introduced with the purpose of taking precedence over any container-default JSP-handling servlet, effectively disabling it. This saves needing container-specific XML configuration that is prone to regression.
Disabling the JSP-handling servlet prevents JSPs from being compiled and served directly at runtime, which can
 lead to an instant RCE if even a single file or disk write is compromised. Instead, all JSPs must be compiled to
 Servlet classes at build-time and registered in Servlets.
- Since:
- 8.8.0
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidservice(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res) Methods inherited from class jakarta.servlet.GenericServletdestroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
- 
Constructor Details- 
FourOhFourServletpublic FourOhFourServlet()
 
- 
- 
Method Details- 
servicepublic void service(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res) throws jakarta.servlet.ServletException, IOException - Specified by:
- servicein interface- jakarta.servlet.Servlet
- Specified by:
- servicein class- jakarta.servlet.GenericServlet
- Throws:
- jakarta.servlet.ServletException
- IOException
 
 
-