- java.lang.Object
-
- com.aoapps.encoding.servlet.SerializationEE
-
public final class SerializationEE extends Object
ManagesSerializationin a Servlet environment.- Author:
- AO Industries, Inc.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_INIT_PARAMContext init parameter that may be used to configure the use of XHTML within an application.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Serializationget(ServletContext servletContext, HttpServletRequest request)Gets the serialization in effect for the request, or the default when not yet set.static SerializationgetDefault(ServletContext servletContext, HttpServletRequest request)Determine if the content may be served asapplication/xhtml+xmlby the rules defined in http://www.w3.org/TR/xhtml-media-types/ Default toapplication/xhtml+xmlas discussed at http://www.smackthemouse.com/xhtmlxml.static Serializationreplace(ServletRequest request, Serialization serialization)Replaces the serialization in effect for the request.static voidset(ServletRequest request, Serialization serialization)Registers the serialization 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 use of XHTML within an application. Must be one of "SGML", "XML", or "auto" (the default).
-
-
Method Detail
-
getDefault
public static Serialization getDefault(ServletContext servletContext, HttpServletRequest request)
Determine if the content may be served asapplication/xhtml+xmlby the rules defined in http://www.w3.org/TR/xhtml-media-types/ Default toapplication/xhtml+xmlas discussed at http://www.smackthemouse.com/xhtmlxml.
-
set
public static void set(ServletRequest request, Serialization serialization)
Registers the serialization in effect for the request.
-
replace
public static Serialization replace(ServletRequest request, Serialization serialization)
Replaces the serialization in effect for the request.- Returns:
- The previous attribute value, if any
-
get
public static Serialization get(ServletContext servletContext, HttpServletRequest request)
Gets the serialization in effect for the request, or the default when not yet set.Once the default is resolved, sets the request attribute.
-
-