public class BaseTag
extends javax.servlet.jsp.tagext.TagSupport
Modifier and Type | Field and Description |
---|---|
protected static MessageResources |
messages
The message resources for this package.
|
protected java.lang.String |
ref
The reference to which the base will created.
|
protected java.lang.String |
REF_PAGE |
protected java.lang.String |
REF_SITE |
protected java.lang.String |
server
The server name to use instead of request.getServerName().
|
protected java.lang.String |
target
The target window for this base reference.
|
Constructor and Description |
---|
BaseTag() |
Modifier and Type | Method and Description |
---|---|
int |
doStartTag()
Process the start of this tag.
|
java.lang.String |
getRef()
Gets the reference to which the base will be created
|
java.lang.String |
getServer()
Returns the server.
|
java.lang.String |
getTarget() |
protected java.lang.String |
renderBaseElement(java.lang.String scheme,
java.lang.String serverName,
int port,
java.lang.String uri)
Render a fully formed HTML <base> element and return it as a
String.
|
void |
setRef(java.lang.String ref)
Sets the reference to which the base will be created.
|
void |
setServer(java.lang.String server)
Sets the server.
|
void |
setTarget(java.lang.String target) |
protected static MessageResources messages
protected final java.lang.String REF_SITE
protected final java.lang.String REF_PAGE
protected java.lang.String server
protected java.lang.String target
protected java.lang.String ref
public java.lang.String getRef()
public void setRef(java.lang.String ref)
ref
- Either "page" to render the base as the jsp path located, or
"site" as the application's contextpublic java.lang.String getTarget()
public void setTarget(java.lang.String target)
public int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.JspException
- if a JSP exception has occurredprotected java.lang.String renderBaseElement(java.lang.String scheme, java.lang.String serverName, int port, java.lang.String uri)
scheme
- The scheme used in the url (ie. http or https).serverName
- port
- uri
- The portion of the url from the protocol name up to
the query string.public java.lang.String getServer()
public void setServer(java.lang.String server)
server
- The server to setCopyright © 2000–2020 Apache Software Foundation. All rights reserved.