java.lang.Object
com.aoapps.encoding.servlet.DoctypeEE
Manages
Doctype
in a Servlet environment.- Author:
- AO Industries, Inc.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Context init parameter that may be used to configure the default doctype within an application. -
Method Summary
Modifier and TypeMethodDescriptionstatic Doctype
get
(ServletContext servletContext, ServletRequest request) Gets the doctype in effect for the request, or the default when not yet set.static Doctype
getDefault
(ServletContext servletContext) Determines the default doctype by first checking for context-param ofDEFAULT_INIT_PARAM
, then usingDoctype.DEFAULT
when unspecified or "default".static Doctype
replace
(ServletRequest request, Doctype doctype) Replaces the doctype in effect for the request.static void
set
(ServletRequest request, Doctype doctype) Registers the doctype in effect for the request.
-
Field Details
-
DEFAULT_INIT_PARAM
Context init parameter that may be used to configure the default doctype within an application.
-
-
Method Details
-
getDefault
Determines the default doctype by first checking for context-param ofDEFAULT_INIT_PARAM
, then usingDoctype.DEFAULT
when unspecified or "default". -
set
Registers the doctype in effect for the request. -
replace
Replaces the doctype in effect for the request.- Returns:
- The previous attribute value, if any
-
get
Gets the doctype in effect for the request, or the default when not yet set.Once the default is resolved, sets the request attribute.
-