Class ViewServlet

  • All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.EnvironmentAware, org.springframework.core.env.EnvironmentCapable

    @ParametersAreNonnullByDefault
    public class ViewServlet
    extends org.springframework.web.servlet.FrameworkServlet
    Main servlet for handling all kind of view requests.
    Author:
    Richard "Shred" Körber
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.springframework.web.servlet.FrameworkServlet

        DEFAULT_CONTEXT_CLASS, DEFAULT_NAMESPACE_SUFFIX, SERVLET_CONTEXT_PREFIX
      • Fields inherited from class org.springframework.web.servlet.HttpServletBean

        logger
    • Constructor Summary

      Constructors 
      Constructor Description
      ViewServlet()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doService​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)  
      protected String getJspPath​(javax.servlet.ServletConfig config)
      Gets the JSP path from the servlet configuration.
      void init​(javax.servlet.ServletConfig config)  
      • Methods inherited from class org.springframework.web.servlet.FrameworkServlet

        applyInitializers, buildLocaleContext, buildRequestAttributes, configureAndRefreshWebApplicationContext, createWebApplicationContext, createWebApplicationContext, destroy, doDelete, doGet, doOptions, doPost, doPut, doTrace, findWebApplicationContext, getContextAttribute, getContextClass, getContextConfigLocation, getContextId, getNamespace, getServletContextAttributeName, getUsernameForRequest, getWebApplicationContext, initFrameworkServlet, initServletBean, initWebApplicationContext, isEnableLoggingRequestDetails, onApplicationEvent, onRefresh, postProcessWebApplicationContext, processRequest, refresh, service, setApplicationContext, setContextAttribute, setContextClass, setContextConfigLocation, setContextId, setContextInitializerClasses, setContextInitializers, setDispatchOptionsRequest, setDispatchTraceRequest, setEnableLoggingRequestDetails, setNamespace, setPublishContext, setPublishEvents, setThreadContextInheritable
      • Methods inherited from class org.springframework.web.servlet.HttpServletBean

        addRequiredProperty, createEnvironment, getEnvironment, getServletName, init, initBeanWrapper, setEnvironment
      • Methods inherited from class javax.servlet.http.HttpServlet

        doHead, getLastModified, service
      • Methods inherited from class javax.servlet.GenericServlet

        getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, log, log
    • Method Detail

      • 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
      • doService

        protected void doService​(javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse resp)
                          throws Exception
        Specified by:
        doService in class org.springframework.web.servlet.FrameworkServlet
        Throws:
        Exception
      • getJspPath

        @Nonnull
        protected String getJspPath​(javax.servlet.ServletConfig config)
        Gets the JSP path from the servlet configuration. The default implementation fetches the value from the servlet's "jspPath" init parameter. Extending classes may override this method to fetch the configuration from somewhere else.
        Parameters:
        config - ServletConfig
        Returns:
        JSP path, must end with a trailing '/'