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 String |
ref
The reference to which the base will created.
|
protected String |
REF_PAGE |
protected String |
REF_SITE |
protected String |
server
The server name to use instead of request.getServerName().
|
protected 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.
|
String |
getRef()
Gets the reference to which the base will be created
|
String |
getServer()
Returns the server.
|
String |
getTarget() |
protected String |
renderBaseElement(String scheme,
String serverName,
int port,
String uri)
Render a fully formed HTML <base> element and return it as a
String.
|
void |
setRef(String ref)
Sets the reference to which the base will be created.
|
void |
setServer(String server)
Sets the server.
|
void |
setTarget(String target) |
protected static MessageResources messages
protected final String REF_SITE
protected final String REF_PAGE
protected String server
protected String target
protected String ref
public String getRef()
public void setRef(String ref)
ref
- Either "page" to render the base as the jsp path located, or
"site" as the application's contextpublic String getTarget()
public void setTarget(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 String renderBaseElement(String scheme, String serverName, int port, 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 String getServer()
public void setServer(String server)
server
- The server to setCopyright © 2000–2017 Apache Software Foundation. All rights reserved.