Class FourOhFourServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- com.atlassian.confluence.impl.webapp.FourOhFourServlet
-
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class FourOhFourServlet extends javax.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 inServlets
.- Since:
- 8.8.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FourOhFourServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
service(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res)
-
-
-
Method Detail
-
service
public void service(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res) throws javax.servlet.ServletException, IOException
- Specified by:
service
in interfacejavax.servlet.Servlet
- Specified by:
service
in classjavax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
IOException
-
-