* @param req
* @return ConstantRendering
*/
public static ConstantRendering getConstantRendering(ServletRequest req)
{
Html html = (Html) req.getAttribute(Html.HTML_TAG_ID);
if (_htmlConstants == null) {
_htmlConstants = ConstantRendering.getRendering(HTML_RENDERING);
_xhtmlConstants = ConstantRendering.getRendering(XHTML_RENDERING);
}
// the default is html 4.0
int renderingType = TagRenderingBase.getDefaultDocType();
if (html != null) {
renderingType = html.getTargetDocumentType();
}
return (renderingType == XHTML_RENDERING) ? _xhtmlConstants : _htmlConstants;
}