BaseTag (Apache Struts API Documentation)
Keywords: org.apache.struts.taglib.html.BaseTag,BaseTag class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts.taglib.html
Class BaseTag

    java.lang.Object
      |
      +--javax.servlet.jsp.tagext.TagSupport
            |
            +--org.apache.struts.taglib.html.BaseTag

All Implemented Interfaces:
  java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class BaseTag
extends javax.servlet.jsp.tagext.TagSupport

Renders an HTML element with an href attribute pointing to the absolute location of the enclosing JSP page. This tag is only valid when nested inside a head tag body. The presence of this tag allows the browser to resolve relative URL's to images, CSS stylesheets and other resources in a manner independent of the URL used to call the ActionServlet.

Version:
  $Revision: 1.1 $ $Date: 2003-08-26 13:57:44 +0100 (Tue, 26 Aug 2003) $
Author:
  Luis Arias , David Graham
See Also:
  Serialized Form

Field Summary
`protected static MessageResources` | `messages` The message resources for this package.
`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.

Fields inherited from class javax.servlet.jsp.tagext.TagSupport
`id, pageContext`

Fields inherited from interface javax.servlet.jsp.tagext.Tag
`EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE`

Constructor Summary
`BaseTag()`

Method Summary
`int` | `doStartTag()` Process the start of this tag.
`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` | `setServer(java.lang.String server)` Sets the server.
`void` | `setTarget(java.lang.String target)`

Methods inherited from class javax.servlet.jsp.tagext.TagSupport
`doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### messages

    protected static MessageResources messages

  The message resources for this package.

### server

    protected java.lang.String server

  The server name to use instead of request.getServerName().

### target

    protected java.lang.String target

  The target window for this base reference.

Constructor Detail

### BaseTag

    public BaseTag()

Method Detail

### getTarget

    public java.lang.String getTarget()

### setTarget

    public void setTarget(java.lang.String target)

### doStartTag

    public int doStartTag()
                   throws javax.servlet.jsp.JspException

  Process the start of this tag.

  Specified by:
    `doStartTag` in interface `javax.servlet.jsp.tagext.Tag`
  Overrides:
    `doStartTag` in class `javax.servlet.jsp.tagext.TagSupport`
  Throws:
    `javax.servlet.jsp.JspException` - if a JSP exception has occurred

### renderBaseElement

    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.

  Parameters:
    `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.
  Returns:
    String An HTML <base> element.
  Since:
    Struts 1.1

### getServer

    public java.lang.String getServer()

  Returns the server.

  Returns:
    String

### setServer

    public void setServer(java.lang.String server)

  Sets the server.

  Parameters:
    `server` - The server to set

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2003 - Apache Software Foundation