org.mmbase.bridge.jsp.taglib
Class ContentTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.mmbase.bridge.jsp.taglib.ContextReferrerTag
org.mmbase.bridge.jsp.taglib.CloudReferrerTag
org.mmbase.bridge.jsp.taglib.LocaleTag
org.mmbase.bridge.jsp.taglib.ContentTag
- All Implemented Interfaces:
- Serializable, BodyTag, IterationTag, JspTag, Tag, TryCatchFinally
public class ContentTag
- extends LocaleTag
Provided environmental information to its body's tags.
- Since:
- MMBase-1.7
- Version:
- $Id: ContentTag.java 42361 2010-06-01 12:44:40Z michiel $
- Author:
- Michiel Meeuwissen
- See Also:
- Serialized Form
| Methods inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag |
appendMoreParameters, doCatch, findLoopOrQuery, findParentTag, findParentTag, findWriter, findWriter, getAttribute, getAttribute, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContentTag, getContextProvider, getContextTag, getCurrentBlock, getDefaultLocale, getEscapedValue, getFormTag, getId, getLocaleFromContext, getObject, getObjectConditional, getPageContext, getPageContextTag, getQuery, getReferid, getString, getTaglibVersion, getThreadPageContext, getTimeZone, getWriterValue, haveBody, release, setContext, setEscape, setId, setListdelimiter, setPageContext, setPageContextOnly, setReferid, setVartype, setWrite, setWriter |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPY
static final CharTransformer COPY
ESCAPER_KEY
public static final String ESCAPER_KEY
- See Also:
- Constant Field Values
ENCODEURLS_KEY
public static final String ENCODEURLS_KEY
- See Also:
- Constant Field Values
DEFAULT
static final ContentTag DEFAULT
ContentTag
public ContentTag()
readXML
protected static void readXML(InputSource escapersSource)
setType
public void setType(String ct)
throws JspTagException
- Throws:
JspTagException
setEncoding
public void setEncoding(String e)
throws JspTagException
- Throws:
JspTagException
setEscaper
public void setEscaper(String e)
throws JspTagException
- Throws:
JspTagException
setPostprocessor
public void setPostprocessor(String e)
throws JspTagException
- Throws:
JspTagException
setExpires
public void setExpires(String e)
throws JspTagException
- Throws:
JspTagException
setDisposition
public void setDisposition(String d)
throws JspTagException
- Throws:
JspTagException- Since:
- MMBase-1.8.5
setVaries
public void setVaries(String v)
throws JspTagException
- Throws:
JspTagException- Since:
- MMBase-1.9.1
getType
public String getType()
throws JspTagException
- Throws:
JspTagException
setUnacceptable
public void setUnacceptable(String u)
throws JspTagException
- Throws:
JspTagException- Since:
- MMBase-1.8.5
setEncodeurls
public void setEncodeurls(String u)
throws JspTagException
- Throws:
JspTagException- Since:
- MMBase-1.9.4
getPostProcessor
protected CharTransformer getPostProcessor()
throws JspTagException
- Returns:
- A CharTransformer or null if no postprocessing needed
- Throws:
JspTagException - can occur if taglibcontent.xml is misconfigured
getEncoding
public String getEncoding()
throws JspTagException
- Throws:
JspTagException
getSimpleCharTransformer
protected static CharTransformer getSimpleCharTransformer(String id,
ContextReferrerTag tag)
throws JspTagException
- Gets a CharTransformer identified by
id, withouth trying to create chains of
them.
- Throws:
JspTagException
getCharTransformer
public static CharTransformer getCharTransformer(String id,
ContextReferrerTag tag)
throws JspTagException
- Gets a CharTransformer identified by
id, which possibly can also be list of id's
in which case a chain of chartransformers will be returned.
- Returns:
- A CharTransformer
- Throws:
JspTagException - if not transformer with given id was configured
getTransformerFactory
public static ParameterizedTransformerFactory getTransformerFactory(String id)
throws JspTagException
- Returns transformer factory with given id or throws exception if there is none
- Throws:
JspTagException
getWriteEscaper
public CharTransformer getWriteEscaper()
- Called by children
- Returns:
- A CharTransformer (not null)
setWriteEscaper
protected void setWriteEscaper()
throws JspTagException
- Throws:
JspTagException
unsetWriteEscaper
protected void unsetWriteEscaper()
determineLocale
protected void determineLocale()
throws JspTagException
- Overrides:
determineLocale in class LocaleTag
- Throws:
JspTagException- See Also:
LocaleTag.determineLocale()
doStartTag
public int doStartTag()
throws JspTagException
- Specified by:
doStartTag in interface Tag- Overrides:
doStartTag in class LocaleTag
- Throws:
JspTagException
addNoCacheHeaders
protected void addNoCacheHeaders(HttpServletRequest request,
HttpServletResponse response,
long expire)
- The code first sets the Expires header to a date in the
past. This indicates to the recipient that the page's content
have already expired, as a hint that it's contents should not be
cached. The no-cache value for the Pragma header is provided by
version 1.0 of the HTTP protocol to further indicate that
browsers and proxy servers should not cache a page. Version 1.1
of HTTP replaces this header with a more specific Cache-Control
header, but recommends including the Pragma header as well for
backward compatibility.
- Parameters:
response - - http responseexpire - - seconds before content should expire- Since:
- MMBase 1.8.1
doEndTag
public int doEndTag()
throws JspTagException
- Specified by:
doEndTag in interface Tag- Overrides:
doEndTag in class LocaleTag
- Throws:
JspTagException
setUser
void setUser(UserContext newUser)
throws JspTagException
- Sets a user. This is used by cloud-tag.
- Throws:
JspTagException
doAfterBody
public int doAfterBody()
throws JspTagException
- Specified by:
doAfterBody in interface IterationTag- Overrides:
doAfterBody in class LocaleTag
- Throws:
JspTagException
MMBase 2.0-SNAPSHOT - null