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