org.mmbase.bridge.jsp.taglib.pageflow
Class UrlTag
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.pageflow.UrlTag
- All Implemented Interfaces:
- BodyTag, IterationTag, ParamHandler, Serializable, Tag
- Direct Known Subclasses:
- IncludeTag, LeafFileTag, RedirectTag, TreeFileTag, UrlWriterTag
- public class UrlTag
- extends CloudReferrerTag
- implements ParamHandler
A Tag to produce an URL with parameters. It can use 'context' parameters easily.
- Version:
- $Id: UrlTag.java,v 1.79 2006/06/23 15:29:06 michiel Exp $
- Author:
- Michiel Meeuwissen
- See Also:
- Serialized Form
| Methods inherited from class org.mmbase.bridge.jsp.taglib.ContextReferrerTag |
findLoopOrQuery, findParentTag, findParentTag, findParentTag, findParentTag, findWriter, findWriter, getAttribute, getAttributeBoolean, getAttributeInteger, getAttributeInteger, getAttributeValue, getContentTag, getContextProvider, getContextTag, getDefaultLocale, getEscapedValue, getId, getObject, getObjectConditional, getPageContext, getPageContextTag, getReferid, getString, getTaglibVersion, getTimeZone, getWriterValue, haveBody, release, setContext, setEscape, setId, setJspvar, setListdelimiter, setPageContext, setReferid, setVartype, setWrite, setWriter |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
extraParameters
protected final List extraParameters
page
protected Attribute page
escapeAmps
protected Attribute escapeAmps
encode
protected Attribute encode
UrlTag
public UrlTag()
setReferids
public void setReferids(String r)
throws JspTagException
- Throws:
JspTagException
setPage
public void setPage(String p)
throws JspTagException
- Throws:
JspTagException
setEscapeamps
public void setEscapeamps(String e)
throws JspTagException
- Throws:
JspTagException
setEncode
public void setEncode(String e)
throws JspTagException
- Throws:
JspTagException
setAbsolute
public void setAbsolute(String a)
throws JspTagException
- Throws:
JspTagException- Since:
- MMBase-1.8
addParameter
public void addParameter(String key,
Object value)
throws JspTagException
- Specified by:
addParameter in interface ParamHandler
- Throws:
JspTagException
doStartTag
public int doStartTag()
throws JspTagException
- Specified by:
doStartTag in interface Tag
- Throws:
JspTagException
getPage
protected String getPage()
throws JspTagException
- Throws:
JspTagException
makeRelative
protected StringBuffer makeRelative(StringBuffer show)
- If it would be nice that an URL starting with '/' would be generated relatively to the current request URL, then this method can do it.
If the URL is not used to write to (this) page, then you probably don't want that.
The behaviour can be overruled by starting the URL with two '/'s.
- Since:
- MMBase-1.7
doMakeRelative
protected boolean doMakeRelative()
- Whether URL must be generatored relatively. This default to false, and can be configured with
the servlet context init parameter 'mmbase.taglib.url.makerelative'. It can be useful to be
sure that url's are relative, if e.g. the context path is taken away in an URL-rewrite (e.g. by proxy).
This might give problems with redirects, but if you happen to solve that too, or don't do that...
- Since:
- MMBase-1.7
addContext
protected boolean addContext()
useAbsoluteAttribute
protected boolean useAbsoluteAttribute(StringBuffer show,
String page)
throws JspTagException
- Throws:
JspTagException- Since:
- MMBase-1.8.1
getUrl
protected String getUrl(boolean writeamp,
boolean encodeUrl)
throws JspTagException
- Returns url with the extra parameters (of referids and sub-param-tags).
- Throws:
JspTagException
getUrl
protected String getUrl()
throws JspTagException
- Throws:
JspTagException
getUrl
protected String getUrl(boolean e)
throws JspTagException
- Throws:
JspTagException
doAfterBodySetValue
protected void doAfterBodySetValue()
throws JspTagException
- Throws:
JspTagException
doAfterBody
public int doAfterBody()
throws JspException
- Specified by:
doAfterBody in interface IterationTag
- Throws:
JspException
initDoEndTag
protected void initDoEndTag()
throws JspTagException
- Throws:
JspTagException
doEndTag
public int doEndTag()
throws JspTagException
- Specified by:
doEndTag in interface Tag- Overrides:
doEndTag in class ContextReferrerTag
- Throws:
JspTagException
MMBase build 1.8.1.20060716