Class ViewServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.springframework.web.servlet.HttpServletBean
-
- org.springframework.web.servlet.FrameworkServlet
-
- org.shredzone.commons.view.servlet.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
-
-
Constructor Summary
Constructors Constructor Description ViewServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoService(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)protected StringgetJspPath(javax.servlet.ServletConfig config)Gets the JSP path from the servlet configuration.voidinit(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
-
-
-
-
Constructor Detail
-
ViewServlet
public ViewServlet()
-
-
Method Detail
-
init
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
- Specified by:
initin interfacejavax.servlet.Servlet- Overrides:
initin classjavax.servlet.GenericServlet- Throws:
javax.servlet.ServletException
-
doService
protected void doService(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws Exception
- Specified by:
doServicein classorg.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 '/'
-
-