Package org.eclnt.jsfserver.util
Class CCInitializeServlets
java.lang.Object
org.eclnt.jsfserver.util.CCInitializeServlets
- All Implemented Interfaces:
ICCServerConstants
Dynamic registration of filters, servlets and listeners.
The server environment of CaptainCasa used the definition via web.xml for quite a long time. Now new filters, servlets and listeners are directly registered in this class.
Advantage 1: whenever there is a change (e.g. new filter is added) then this change does not quire an update of then web.xml on application side.
Advantage 2: enviroments like Spring boot do not follow the web.xml based configuration. Calling the processing of this class within the startup of an e.g. Spring Boot container will properly start up the CaptainCasa runtime.
This class can be overridden by own implementations - and it is designed to be overridden! Your implementation class needs to be registered in system.xml:
<servletcontextconfiguration initializationclass="..." />
The server environment of CaptainCasa used the definition via web.xml for quite a long time. Now new filters, servlets and listeners are directly registered in this class.
Advantage 1: whenever there is a change (e.g. new filter is added) then this change does not quire an update of then web.xml on application side.
Advantage 2: enviroments like Spring boot do not follow the web.xml based configuration. Calling the processing of this class within the startup of an e.g. Spring Boot container will properly start up the CaptainCasa runtime.
This class can be overridden by own implementations - and it is designed to be overridden! Your implementation class needs to be registered in system.xml:
<servletcontextconfiguration initializationclass="..." />
-
Field Summary
Fields inherited from interface org.eclnt.jsfserver.util.ICCServerConstants
CLIENTJAVATYPE_FX, CLIENTJAVATYPE_SWING, CLIENTTYPE_APPLET, CLIENTTYPE_APPLICATION, CLIENTTYPE_BROWSER, CLIENTTYPE_RISC, CLIENTTYPE_UI5, CLIENTTYPE_WEBSTART, EXPLICIT_NULL, FOCUSSEQUENCE_FIX_PREFIX, HEADER_ATTRIBUTE_CLIENT, HEADER_ATTRIBUTE_CLIENTJAVATYPE, HEADER_ATTRIBUTE_COOKIESENABLED, HEADER_ATTRIBUTE_COUNTRY, HEADER_ATTRIBUTE_DEVICESCREENHEIGHT, HEADER_ATTRIBUTE_DEVICESCREENWIDTH, HEADER_ATTRIBUTE_DEVICETYPE, HEADER_ATTRIBUTE_LANGUAGE, HEADER_ATTRIBUTE_MEDIADEVICES, HEADER_ATTRIBUTE_ORIGINALURL, HEADER_ATTRIBUTE_PERFORMANCEDATA, HEADER_ATTRIBUTE_REQUESTID, HEADER_ATTRIBUTE_TIMEZONEOFFSET, HEADER_ATTRIBUTE_USERAGENT, HEADER_ATTRIBUTE_XFRAMEOPTIONS, HEADER_RESPONSE_ATTRIBUTE_HTTPSESSIONID, HEADER_RESPONSE_ATTRIBUTE_HTTPSESSIONREFERENCEURL, HEADER_RESPONSE_ATTRIBUTE_HTTPSESSIONTRACKINGMODE, HEADER_RESPONSE_ATTRIBUTE_OVERRIDE, HEADER_RESPONSE_ATTRIBUTE_RELOAD, HEADER_RESPONSE_ATTRIBUTE_STYLE, INPUTMASK_VALUEMODE_WITHMASK, INPUTMASK_VALUEMODE_WITHOUTMASK, LAYOUTEXTENSION_JSP, LAYOUTEXTENSION_XML, QP_CCSTYLE, QP_KEEPDIALOGSESSION, QP_SUBPAGEID, SECURITY_ROLE_CCADMIN, SESSION_TRACKING_COOKIE, SESSION_TRACKING_URL, TEXTPANE_CONTENTTYPE_HTML, TEXTPANE_CONTENTTYPE_PLAIN
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected EnumSet<javax.servlet.DispatcherType>
createDispatcherTypeEnumSetForFilter
(Class filterClass) Defines which types of requests will invoke the filter.static void
initialize
(javax.servlet.ServletContext servletContext) protected javax.servlet.FilterRegistration
initializeFilter
(javax.servlet.ServletContext servletContext, Class filterClass, String... mappings) protected void
initializeFilters
(javax.servlet.ServletContext servletContext) protected void
initializeInstance
(javax.servlet.ServletContext servletContext) protected void
initializeListener
(javax.servlet.ServletContext servletContext, Class listenerClass) protected void
initializeListeners
(javax.servlet.ServletContext servletContext) protected void
initializeResourceAccessFilter
(javax.servlet.ServletContext servletContext) protected void
initializeServlet
(javax.servlet.ServletContext servletContext, Class servletClass, String... mappings) protected void
initializeServlet
(javax.servlet.ServletContext servletContext, String servletName, Class servletClass, String... mappings) protected void
initializeServlets
(javax.servlet.ServletContext servletContext) static CCInitializeServlets
instance()
protected void
manageServletSecuritySettings
(javax.servlet.ServletContext servletContext, Class servletClass, javax.servlet.ServletRegistration.Dynamic servletReg)
-
Constructor Details
-
CCInitializeServlets
public CCInitializeServlets()
-
-
Method Details
-
instance
-
initialize
public static void initialize(javax.servlet.ServletContext servletContext) -
initializeInstance
protected void initializeInstance(javax.servlet.ServletContext servletContext) -
initializeFilters
protected void initializeFilters(javax.servlet.ServletContext servletContext) -
initializeListeners
protected void initializeListeners(javax.servlet.ServletContext servletContext) -
initializeServlets
protected void initializeServlets(javax.servlet.ServletContext servletContext) -
initializeListener
-
initializeFilter
-
createDispatcherTypeEnumSetForFilter
protected EnumSet<javax.servlet.DispatcherType> createDispatcherTypeEnumSetForFilter(Class filterClass) Defines which types of requests will invoke the filter. By default the result contains the REQUEST and the FORWARD request types.
Base info for this was taken out of: https://stackoverflow.com/questions/31065687/servlet-filter-forwarded-request-from-a-servlet-will-go-to-servlet-filter-or-n -
initializeResourceAccessFilter
protected void initializeResourceAccessFilter(javax.servlet.ServletContext servletContext) -
initializeServlet
-
initializeServlet
-
manageServletSecuritySettings
protected void manageServletSecuritySettings(javax.servlet.ServletContext servletContext, Class servletClass, javax.servlet.ServletRegistration.Dynamic servletReg)
-