|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
com.cc.framework.taglib.util.BaseTag
Tag handler for the base
tag. The <util:base> tag
creates a html <base href="...."> element. The tag automatically sets
the context root, so you can write <util:base> instead of <base
href="http://localhost:8080/contextRoot/;"> if the context root of your
application points to "contextRoot". The tag also sets automatically the used
protocol (http, https). So you can deploy your application under differnt
names, without changing the <base href="...."> element.
Field Summary | |
private java.lang.String |
contextPath
ContextPath |
private java.lang.String |
host
Host |
private java.lang.String |
port
Portnumber |
private static long |
serialVersionUID
Serial Version UID |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
BaseTag()
Constructor |
Method Summary | |
int |
doStartTag()
|
static java.lang.String |
getProtocol(javax.servlet.jsp.PageContext pageContext)
Returns the Protocol used by the Application/WebServer |
void |
setContextPath(java.lang.String contextPath)
Sets the ContextPath |
void |
setHost(java.lang.String host)
Sets the Host |
void |
setPageContext(javax.servlet.jsp.PageContext arg0)
|
void |
setPort(java.lang.String port)
Sets the Portnumber |
static void |
writeBase(javax.servlet.jsp.PageContext pageContext,
java.lang.String host,
java.lang.String port,
java.lang.String contextPath)
Writes the html base tag to the output |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final long serialVersionUID
private java.lang.String contextPath
private java.lang.String port
private java.lang.String host
Constructor Detail |
public BaseTag()
Method Detail |
public void setPageContext(javax.servlet.jsp.PageContext arg0)
TagSupport.setPageContext(javax.servlet.jsp.PageContext)
public int doStartTag() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
TagSupport.doStartTag()
public static void writeBase(javax.servlet.jsp.PageContext pageContext, java.lang.String host, java.lang.String port, java.lang.String contextPath)
pageContext
- PageContexthost
- Hostport
- PortnumbercontextPath
- ContextPathpublic static java.lang.String getProtocol(javax.servlet.jsp.PageContext pageContext)
pageContext
- PageContext
public void setHost(java.lang.String host)
host
- Hostpublic void setPort(java.lang.String port)
port
- Portnumberpublic void setContextPath(java.lang.String contextPath)
contextPath
- ContextPath
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |