Class StaticFileServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
ch.tocco.nice2.web.core.spi.servlet.StaticFileServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable
Direct Known Subclasses:
DevconFileServlet, NewClientFileServlet, WidgetShowcaseFileServlet

public abstract class StaticFileServlet extends jakarta.servlet.http.HttpServlet
Serves a static file.
See Also:
  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     
    protected ModelResource
     

    Fields inherited from class jakarta.servlet.http.HttpServlet Link icon

    LEGACY_DO_HEAD
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    StaticFileServlet(org.slf4j.Logger log)
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    void
    doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp)
     
    protected String
     
    protected String
     

    Methods inherited from class jakarta.servlet.http.HttpServlet Link icon

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

    Methods inherited from class jakarta.servlet.GenericServlet Link icon

    destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details Link icon

    • file Link icon

      protected ModelResource file
    • activated Link icon

      protected boolean activated
  • Constructor Details Link icon

    • StaticFileServlet Link icon

      public StaticFileServlet(org.slf4j.Logger log)
  • Method Details Link icon

    • getContentType Link icon

      protected String getContentType()
    • doGet Link icon

      public void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws IOException
      Overrides:
      doGet in class jakarta.servlet.http.HttpServlet
      Throws:
      IOException
    • processFileContent Link icon

      protected String processFileContent(InputStreamReader reader) throws IOException
      Throws:
      IOException