Class StaticContentServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.epics.archiverappliance.common.StaticContentServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable
public class StaticContentServlet
extends jakarta.servlet.http.HttpServlet
Serves static content in the web app...
Previously, org.apache.catalina.servlets.DefaultServlet was used for this purpose.
But this ties us to Tomcat and some expressed the desire to run this in other containers.
In addition, we needed the ability to serve content from within zip files.
This lets us upgrade JavaScript libraries easily; many of which are delivered a multiple files in a versioned zip.
This is code from ... substantially modified.
- Author:
- mshankar
- 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 request, jakarta.servlet.http.HttpServletResponse response) protected voiddoHead(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) voidinit(jakarta.servlet.ServletConfig config) Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doOptions, doPatch, doPost, doPut, doTrace, getLastModified, isSensitiveHeader, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
StaticContentServlet
public StaticContentServlet()
-
-
Method Details
-
init
public void init(jakarta.servlet.ServletConfig config) throws jakarta.servlet.ServletException - Specified by:
initin interfacejakarta.servlet.Servlet- Overrides:
initin classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletException
-
doHead
protected void doHead(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException - Overrides:
doHeadin classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletExceptionIOException
-
doGet
protected void doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException - Overrides:
doGetin classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletExceptionIOException
-