Class ServletContextHandler.Context

All Implemented Interfaces:
jakarta.servlet.ServletContext, Attributes, Dumpable
Direct Known Subclasses:
WebAppContext.Context
Enclosing class:
ServletContextHandler

public class ServletContextHandler.Context extends ContextHandler.Context
  • Constructor Details

    • Context

      public Context()
  • Method Details

    • getNamedDispatcher

      public jakarta.servlet.RequestDispatcher getNamedDispatcher(String name)
      Specified by:
      getNamedDispatcher in interface jakarta.servlet.ServletContext
      Overrides:
      getNamedDispatcher in class ContextHandler.StaticContext
    • addFilter

      public jakarta.servlet.FilterRegistration.Dynamic addFilter(String filterName, Class<? extends jakarta.servlet.Filter> filterClass)
      Specified by:
      addFilter in interface jakarta.servlet.ServletContext
      Overrides:
      addFilter in class ContextHandler.StaticContext
      Since:
      servlet-api-3.0
    • addFilter

      public jakarta.servlet.FilterRegistration.Dynamic addFilter(String filterName, String className)
      Specified by:
      addFilter in interface jakarta.servlet.ServletContext
      Overrides:
      addFilter in class ContextHandler.StaticContext
      Since:
      servlet-api-3.0
    • addFilter

      public jakarta.servlet.FilterRegistration.Dynamic addFilter(String filterName, jakarta.servlet.Filter filter)
      Specified by:
      addFilter in interface jakarta.servlet.ServletContext
      Overrides:
      addFilter in class ContextHandler.StaticContext
      Since:
      servlet-api-3.0
    • addServlet

      public jakarta.servlet.ServletRegistration.Dynamic addServlet(String servletName, Class<? extends jakarta.servlet.Servlet> servletClass)
      Specified by:
      addServlet in interface jakarta.servlet.ServletContext
      Overrides:
      addServlet in class ContextHandler.StaticContext
      Since:
      servlet-api-3.0
    • addServlet

      public jakarta.servlet.ServletRegistration.Dynamic addServlet(String servletName, String className)
      Specified by:
      addServlet in interface jakarta.servlet.ServletContext
      Overrides:
      addServlet in class ContextHandler.StaticContext
      Since:
      servlet-api-3.0
    • addServlet

      public jakarta.servlet.ServletRegistration.Dynamic addServlet(String servletName, jakarta.servlet.Servlet servlet)
      Specified by:
      addServlet in interface jakarta.servlet.ServletContext
      Overrides:
      addServlet in class ContextHandler.StaticContext
      Since:
      servlet-api-3.0
    • addJspFile

      public jakarta.servlet.ServletRegistration.Dynamic addJspFile(String servletName, String jspFile)
      Specified by:
      addJspFile in interface jakarta.servlet.ServletContext
      Overrides:
      addJspFile in class ContextHandler.StaticContext
    • getInitParameter

      public String getInitParameter(String name)
      Specified by:
      getInitParameter in interface jakarta.servlet.ServletContext
      Overrides:
      getInitParameter in class ContextHandler.Context
    • setInitParameter

      public boolean setInitParameter(String name, String value)
      Specified by:
      setInitParameter in interface jakarta.servlet.ServletContext
      Overrides:
      setInitParameter in class ContextHandler.Context
    • createInstance

      public <T> T createInstance(Class<T> clazz) throws jakarta.servlet.ServletException
      Overrides:
      createInstance in class ContextHandler.StaticContext
      Throws:
      jakarta.servlet.ServletException
    • createInstance

      public <T> T createInstance(BaseHolder<T> holder) throws jakarta.servlet.ServletException
      Throws:
      jakarta.servlet.ServletException
    • destroyFilter

      public <T extends jakarta.servlet.Filter> void destroyFilter(T f)
    • destroyServlet

      public <T extends jakarta.servlet.Servlet> void destroyServlet(T s)
    • getDefaultSessionTrackingModes

      public Set<jakarta.servlet.SessionTrackingMode> getDefaultSessionTrackingModes()
      Specified by:
      getDefaultSessionTrackingModes in interface jakarta.servlet.ServletContext
      Overrides:
      getDefaultSessionTrackingModes in class ContextHandler.StaticContext
    • getEffectiveSessionTrackingModes

      public Set<jakarta.servlet.SessionTrackingMode> getEffectiveSessionTrackingModes()
      Specified by:
      getEffectiveSessionTrackingModes in interface jakarta.servlet.ServletContext
      Overrides:
      getEffectiveSessionTrackingModes in class ContextHandler.StaticContext
    • getFilterRegistration

      public jakarta.servlet.FilterRegistration getFilterRegistration(String filterName)
      Specified by:
      getFilterRegistration in interface jakarta.servlet.ServletContext
      Overrides:
      getFilterRegistration in class ContextHandler.StaticContext
    • getFilterRegistrations

      public Map<String,? extends jakarta.servlet.FilterRegistration> getFilterRegistrations()
      Specified by:
      getFilterRegistrations in interface jakarta.servlet.ServletContext
      Overrides:
      getFilterRegistrations in class ContextHandler.StaticContext
    • getServletRegistration

      public jakarta.servlet.ServletRegistration getServletRegistration(String servletName)
      Specified by:
      getServletRegistration in interface jakarta.servlet.ServletContext
      Overrides:
      getServletRegistration in class ContextHandler.StaticContext
    • getServletRegistrations

      public Map<String,? extends jakarta.servlet.ServletRegistration> getServletRegistrations()
      Specified by:
      getServletRegistrations in interface jakarta.servlet.ServletContext
      Overrides:
      getServletRegistrations in class ContextHandler.StaticContext
    • getSessionCookieConfig

      public jakarta.servlet.SessionCookieConfig getSessionCookieConfig()
      Specified by:
      getSessionCookieConfig in interface jakarta.servlet.ServletContext
      Overrides:
      getSessionCookieConfig in class ContextHandler.StaticContext
    • setSessionTrackingModes

      public void setSessionTrackingModes(Set<jakarta.servlet.SessionTrackingMode> sessionTrackingModes)
      Specified by:
      setSessionTrackingModes in interface jakarta.servlet.ServletContext
      Overrides:
      setSessionTrackingModes in class ContextHandler.StaticContext
    • getSessionTimeout

      public int getSessionTimeout()
      Specified by:
      getSessionTimeout in interface jakarta.servlet.ServletContext
      Overrides:
      getSessionTimeout in class ContextHandler.StaticContext
    • setSessionTimeout

      public void setSessionTimeout(int sessionTimeout)
      Specified by:
      setSessionTimeout in interface jakarta.servlet.ServletContext
      Overrides:
      setSessionTimeout in class ContextHandler.StaticContext
    • createServlet

      public <T extends jakarta.servlet.Servlet> T createServlet(Class<T> clazz) throws jakarta.servlet.ServletException
      Specified by:
      createServlet in interface jakarta.servlet.ServletContext
      Overrides:
      createServlet in class ContextHandler.StaticContext
      Throws:
      jakarta.servlet.ServletException
    • createFilter

      public <T extends jakarta.servlet.Filter> T createFilter(Class<T> clazz) throws jakarta.servlet.ServletException
      Specified by:
      createFilter in interface jakarta.servlet.ServletContext
      Overrides:
      createFilter in class ContextHandler.StaticContext
      Throws:
      jakarta.servlet.ServletException
    • createListener

      public <T extends EventListener> T createListener(Class<T> clazz) throws jakarta.servlet.ServletException
      Specified by:
      createListener in interface jakarta.servlet.ServletContext
      Overrides:
      createListener in class ContextHandler.StaticContext
      Throws:
      jakarta.servlet.ServletException
    • addListener

      public void addListener(String className)
      Specified by:
      addListener in interface jakarta.servlet.ServletContext
      Overrides:
      addListener in class ContextHandler.Context
    • addListener

      public <T extends EventListener> void addListener(T t)
      Specified by:
      addListener in interface jakarta.servlet.ServletContext
      Overrides:
      addListener in class ContextHandler.Context
    • addListener

      public void addListener(Class<? extends EventListener> listenerClass)
      Specified by:
      addListener in interface jakarta.servlet.ServletContext
      Overrides:
      addListener in class ContextHandler.Context
    • getJspConfigDescriptor

      public jakarta.servlet.descriptor.JspConfigDescriptor getJspConfigDescriptor()
      Specified by:
      getJspConfigDescriptor in interface jakarta.servlet.ServletContext
      Overrides:
      getJspConfigDescriptor in class ContextHandler.Context
    • setJspConfigDescriptor

      public void setJspConfigDescriptor(jakarta.servlet.descriptor.JspConfigDescriptor d)
      Overrides:
      setJspConfigDescriptor in class ContextHandler.Context
    • declareRoles

      public void declareRoles(String... roleNames)
      Specified by:
      declareRoles in interface jakarta.servlet.ServletContext
      Overrides:
      declareRoles in class ContextHandler.Context
    • getRequestCharacterEncoding

      public String getRequestCharacterEncoding()
      Specified by:
      getRequestCharacterEncoding in interface jakarta.servlet.ServletContext
      Overrides:
      getRequestCharacterEncoding in class ContextHandler.StaticContext
    • setRequestCharacterEncoding

      public void setRequestCharacterEncoding(String encoding)
      Specified by:
      setRequestCharacterEncoding in interface jakarta.servlet.ServletContext
      Overrides:
      setRequestCharacterEncoding in class ContextHandler.StaticContext
    • getResponseCharacterEncoding

      public String getResponseCharacterEncoding()
      Specified by:
      getResponseCharacterEncoding in interface jakarta.servlet.ServletContext
      Overrides:
      getResponseCharacterEncoding in class ContextHandler.StaticContext
    • setResponseCharacterEncoding

      public void setResponseCharacterEncoding(String encoding)
      Specified by:
      setResponseCharacterEncoding in interface jakarta.servlet.ServletContext
      Overrides:
      setResponseCharacterEncoding in class ContextHandler.StaticContext