org.apache.struts.taglib.html
Class ImgTag

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--javax.servlet.jsp.tagext.BodyTagSupport
              |
              +--org.apache.struts.taglib.html.BaseHandlerTag
                    |
                    +--org.apache.struts.taglib.html.ImgTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
NestedImgTag

public class ImgTag
extends BaseHandlerTag

Generate an IMG tag to the specified image URI.

TODO:

Version:
$Revision: 1.1 $
Author:
Michael Westbay, Craig McClanahan
See Also:
Serialized Form

Field Summary
protected  java.lang.String align
          The property to specify where to align the image.
protected  java.lang.String border
          The border size around the image.
protected  java.lang.String height
          The image height.
protected  java.lang.String hspace
          The horizontal spacing around the image.
protected  java.lang.String imageName
          The image name for named images.
protected  java.lang.String ismap
          Server-side image map declaration.
protected  java.lang.String lowsrc
          Deprecated. This is not defined in the HTML 4.01 spec and will be removed in a future version of Struts.
protected static MessageResources messages
          The message resources for this package.
protected  java.lang.String name
          The JSP bean name for query parameters.
protected  java.lang.String page
          The module-relative path, starting with a slash character, of the image to be displayed by this rendered tag.
protected  java.lang.String pageKey
          The message resources key under which we should look up the page attribute for this generated tag, if any.
protected  java.lang.String paramId
          In situations where an image is dynamically generated (such as to create a chart graph), this specifies the single-parameter request parameter name to generate.
protected  java.lang.String paramName
          The single-parameter JSP bean name.
protected  java.lang.String paramProperty
          The single-parameter JSP bean property.
protected  java.lang.String paramScope
          The single-parameter JSP bean scope.
protected  java.lang.String property
          The JSP bean property name for query parameters.
protected  java.lang.String scope
          The scope of the bean specified by the name property, if any.
protected  java.lang.String src
          The image source URI.
protected  java.lang.String srcKey
          The message resources key under which we should look up the src attribute for this generated tag, if any.
protected  java.lang.String usemap
          Client-side image map declaration.
protected  java.lang.String vspace
          The vertical spacing around the image.
protected  java.lang.String width
          The image width.
 
Fields inherited from class org.apache.struts.taglib.html.BaseHandlerTag
accesskey, defaultLocale, indexed, tabindex
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
ImgTag()
           
 
Method Summary
 int doEndTag()
          Render the end of the IMG tag.
 int doStartTag()
          Render the beginning of the IMG tag.
 java.lang.String getAlign()
           
 java.lang.String getBorder()
           
 java.lang.String getHeight()
           
 java.lang.String getHspace()
           
 java.lang.String getImageName()
           
 java.lang.String getIsmap()
           
 java.lang.String getLowsrc()
          Deprecated. This is not defined in the HTML 4.01 spec and will be removed in a future version of Struts.
 java.lang.String getName()
           
 java.lang.String getPage()
           
 java.lang.String getPageKey()
           
 java.lang.String getParamId()
           
 java.lang.String getParamName()
           
 java.lang.String getParamProperty()
           
 java.lang.String getParamScope()
           
 java.lang.String getProperty()
           
 java.lang.String getScope()
           
 java.lang.String getSrc()
           
 java.lang.String getSrcKey()
           
 java.lang.String getUsemap()
           
 java.lang.String getVspace()
           
 java.lang.String getWidth()
           
 void release()
          Release any acquired resources.
 void setAlign(java.lang.String align)
           
 void setBorder(java.lang.String border)
           
 void setHeight(java.lang.String height)
           
 void setHspace(java.lang.String hspace)
           
 void setImageName(java.lang.String imageName)
           
 void setIsmap(java.lang.String ismap)
           
 void setLowsrc(java.lang.String lowsrc)
           
 void setName(java.lang.String name)
           
 void setPage(java.lang.String page)
           
 void setPageKey(java.lang.String pageKey)
           
 void setParamId(java.lang.String paramId)
           
 void setParamName(java.lang.String paramName)
           
 void setParamProperty(java.lang.String paramProperty)
           
 void setParamScope(java.lang.String paramScope)
           
 void setProperty(java.lang.String property)
           
 void setScope(java.lang.String scope)
           
 void setSrc(java.lang.String src)
           
 void setSrcKey(java.lang.String srcKey)
           
 void setUsemap(java.lang.String usemap)
           
 void setVspace(java.lang.String vspace)
           
 void setWidth(java.lang.String width)
           
protected  java.lang.String src()
          Return the base source URL that will be rendered in the src property for this generated element, or null if there is no such URL.
protected  java.lang.String url(java.lang.String url)
          Return the specified src URL, modified as necessary with optional request parameters.
 
Methods inherited from class org.apache.struts.taglib.html.BaseHandlerTag
getAccesskey, getAlt, getAltKey, getBundle, getDisabled, getElementClose, getIndexed, getLocale, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getReadonly, getStyle, getStyleClass, getStyleId, getTabindex, getTitle, getTitleKey, isXhtml, lookupProperty, message, prepareEventHandlers, prepareFocusEvents, prepareIndex, prepareKeyEvents, prepareMouseEvents, prepareStyles, prepareTextEvents, setAccesskey, setAlt, setAltKey, setBundle, setDisabled, setIndexed, setLocale, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setReadonly, setStyle, setStyleClass, setStyleId, setTabindex, setTitle, setTitleKey
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

align

protected java.lang.String align
The property to specify where to align the image.


border

protected java.lang.String border
The border size around the image.


height

protected java.lang.String height
The image height.


hspace

protected java.lang.String hspace
The horizontal spacing around the image.


imageName

protected java.lang.String imageName
The image name for named images.


ismap

protected java.lang.String ismap
Server-side image map declaration.


lowsrc

protected java.lang.String lowsrc
Deprecated. This is not defined in the HTML 4.01 spec and will be removed in a future version of Struts.

The low resolution image source URI.


messages

protected static MessageResources messages
The message resources for this package.


name

protected java.lang.String name
The JSP bean name for query parameters.


page

protected java.lang.String page
The module-relative path, starting with a slash character, of the image to be displayed by this rendered tag.


pageKey

protected java.lang.String pageKey
The message resources key under which we should look up the page attribute for this generated tag, if any.


paramId

protected java.lang.String paramId
In situations where an image is dynamically generated (such as to create a chart graph), this specifies the single-parameter request parameter name to generate.


paramName

protected java.lang.String paramName
The single-parameter JSP bean name.


paramProperty

protected java.lang.String paramProperty
The single-parameter JSP bean property.


paramScope

protected java.lang.String paramScope
The single-parameter JSP bean scope.


property

protected java.lang.String property
The JSP bean property name for query parameters.


scope

protected java.lang.String scope
The scope of the bean specified by the name property, if any.


src

protected java.lang.String src
The image source URI.


srcKey

protected java.lang.String srcKey
The message resources key under which we should look up the src attribute for this generated tag, if any.


usemap

protected java.lang.String usemap
Client-side image map declaration.


vspace

protected java.lang.String vspace
The vertical spacing around the image.


width

protected java.lang.String width
The image width.

Constructor Detail

ImgTag

public ImgTag()
Method Detail

getAlign

public java.lang.String getAlign()

setAlign

public void setAlign(java.lang.String align)

getBorder

public java.lang.String getBorder()

setBorder

public void setBorder(java.lang.String border)

getHeight

public java.lang.String getHeight()

setHeight

public void setHeight(java.lang.String height)

getHspace

public java.lang.String getHspace()

setHspace

public void setHspace(java.lang.String hspace)

getImageName

public java.lang.String getImageName()

setImageName

public void setImageName(java.lang.String imageName)

getIsmap

public java.lang.String getIsmap()

setIsmap

public void setIsmap(java.lang.String ismap)

getLowsrc

public java.lang.String getLowsrc()
Deprecated. This is not defined in the HTML 4.01 spec and will be removed in a future version of Struts.


setLowsrc

public void setLowsrc(java.lang.String lowsrc)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getPage

public java.lang.String getPage()

setPage

public void setPage(java.lang.String page)

getPageKey

public java.lang.String getPageKey()

setPageKey

public void setPageKey(java.lang.String pageKey)

getParamId

public java.lang.String getParamId()

setParamId

public void setParamId(java.lang.String paramId)

getParamName

public java.lang.String getParamName()

setParamName

public void setParamName(java.lang.String paramName)

getParamProperty

public java.lang.String getParamProperty()

setParamProperty

public void setParamProperty(java.lang.String paramProperty)

getParamScope

public java.lang.String getParamScope()

setParamScope

public void setParamScope(java.lang.String paramScope)

getProperty

public java.lang.String getProperty()

setProperty

public void setProperty(java.lang.String property)

getScope

public java.lang.String getScope()

setScope

public void setScope(java.lang.String scope)

getSrc

public java.lang.String getSrc()

setSrc

public void setSrc(java.lang.String src)

getSrcKey

public java.lang.String getSrcKey()

setSrcKey

public void setSrcKey(java.lang.String srcKey)

getUsemap

public java.lang.String getUsemap()

setUsemap

public void setUsemap(java.lang.String usemap)

getVspace

public java.lang.String getVspace()

setVspace

public void setVspace(java.lang.String vspace)

getWidth

public java.lang.String getWidth()

setWidth

public void setWidth(java.lang.String width)

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Render the beginning of the IMG tag.

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

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Render the end of the IMG tag.

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

release

public void release()
Release any acquired resources.

Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class BaseHandlerTag

src

protected java.lang.String src()
                        throws javax.servlet.jsp.JspException
Return the base source URL that will be rendered in the src property for this generated element, or null if there is no such URL.

Throws:
javax.servlet.jsp.JspException - if an error occurs

url

protected java.lang.String url(java.lang.String url)
                        throws javax.servlet.jsp.JspException
Return the specified src URL, modified as necessary with optional request parameters.

Parameters:
url - The URL to be modified (or null if this url will not be used)
Throws:
javax.servlet.jsp.JspException - if an error occurs preparing the URL


Copyright © 2000-2003 - Apache Software Foundation