Class StaticContentServlet

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.epics.archiverappliance.common.StaticContentServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class StaticContentServlet extends javax.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:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
     
    protected void
    doHead(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
     
    void
    init(javax.servlet.ServletConfig config)
     

    Methods inherited from class javax.servlet.http.HttpServlet

    doDelete, doOptions, doPost, doPut, doTrace, getLastModified, service, service

    Methods inherited from class javax.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

    • StaticContentServlet

      public StaticContentServlet()
  • Method Details

    • init

      public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
      Specified by:
      init in interface javax.servlet.Servlet
      Overrides:
      init in class javax.servlet.GenericServlet
      Throws:
      javax.servlet.ServletException
    • doHead

      protected void doHead(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
      Overrides:
      doHead in class javax.servlet.http.HttpServlet
      Throws:
      javax.servlet.ServletException
      IOException
    • doGet

      protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
      Overrides:
      doGet in class javax.servlet.http.HttpServlet
      Throws:
      javax.servlet.ServletException
      IOException