- java.lang.Object
-
- com.aoapps.encoding.servlet.DoctypeEE
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_INIT_PARAMContext init parameter that may be used to configure the default doctype within an application.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Doctypeget(ServletContext servletContext, ServletRequest request)Gets the doctype in effect for the request, or the default when not yet set.static DoctypegetDefault(ServletContext servletContext)Determines the default doctype by first checking for context-param ofDEFAULT_INIT_PARAM, then usingDoctype.DEFAULTwhen unspecified or "default".static Doctypereplace(ServletRequest request, Doctype doctype)Replaces the doctype in effect for the request.static voidset(ServletRequest request, Doctype doctype)Registers the doctype in effect for the request.
-
-
-
Field Detail
-
DEFAULT_INIT_PARAM
public static final String DEFAULT_INIT_PARAM
Context init parameter that may be used to configure the default doctype within an application.
-
-
Method Detail
-
getDefault
public static Doctype getDefault(ServletContext servletContext)
Determines the default doctype by first checking for context-param ofDEFAULT_INIT_PARAM, then usingDoctype.DEFAULTwhen unspecified or "default".
-
set
public static void set(ServletRequest request, Doctype doctype)
Registers the doctype in effect for the request.
-
replace
public static Doctype replace(ServletRequest request, Doctype doctype)
Replaces the doctype in effect for the request.- Returns:
- The previous attribute value, if any
-
get
public static Doctype get(ServletContext servletContext, ServletRequest request)
Gets the doctype in effect for the request, or the default when not yet set.Once the default is resolved, sets the request attribute.
-
-