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

## 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, javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class ImgTag
extends BaseHandlerTag

Generate an IMG tag to the specified image URI.

TODO:

- make the alt, src, and lowsrc settable from properties (for i18n)
- handle onLoad, onAbort, and onError events (my JavaScript book is very old, there may be more unsupported events in the past couple of IE versions)

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` | `alt` The alternate text to display for the image.
`protected java.lang.String` | `altKey` The message lookup key used to look up internationalized messages.
`protected java.lang.String` | `border` The border size around the image.
`protected java.lang.String` | `bundle` The name of the servlet context attribute containing our message resources.
`protected static java.util.Locale` | `defaultLocale` The default Locale for our server.
`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` | `locale` The name of the attribute containing the Locale to be used for looking up internationalized messages.
`protected java.lang.String` | `lowsrc` The low resolution image source URI.
`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 context-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, disabled, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselect, readonly, style, styleClass, styleId, tabindex, title`

Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
`bodyContent`

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

Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
`EVAL_BODY_BUFFERED, EVAL_BODY_TAG`

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
`ImgTag()`

Method Summary
`protected java.lang.String` | `alt()` Return the alternate text to be included on this generated element, or `null` if there is no such text.
`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` | `getAlt()`
`java.lang.String` | `getAltKey()`
`java.lang.String` | `getBorder()`
`java.lang.String` | `getBundle()`
`java.lang.String` | `getHeight()`
`java.lang.String` | `getHspace()`
`java.lang.String` | `getImageName()`
`java.lang.String` | `getIsmap()`
`java.lang.String` | `getLocale()`
`java.lang.String` | `getLowsrc()`
`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` | `setAlt(java.lang.String alt)`
`void` | `setAltKey(java.lang.String altKey)`
`void` | `setBorder(java.lang.String border)`
`void` | `setBundle(java.lang.String bundle)`
`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` | `setLocale(java.lang.String locale)`
`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, getDisabled, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getReadonly, getStyle, getStyleClass, getStyleId, getTabindex, getTitle, prepareEventHandlers, prepareFocusEvents, prepareKeyEvents, prepareMouseEvents, prepareStyles, prepareTextEvents, setAccesskey, setDisabled, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setReadonly, setStyle, setStyleClass, setStyleId, setTabindex, setTitle`

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, registerNatives, 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.

### alt

    protected java.lang.String alt

  The alternate text to display for the image. This is used for text based browsers and/or as a "tool-tip" for the image.

### altKey

    protected java.lang.String altKey

  The message lookup key used to look up internationalized messages.

### border

    protected java.lang.String border

  The border size around the image.

### bundle

    protected java.lang.String bundle

  The name of the servlet context attribute containing our message resources.

### defaultLocale

    protected static final java.util.Locale defaultLocale

  The default Locale for our server.

### 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.

### locale

    protected java.lang.String locale

  The name of the attribute containing the Locale to be used for looking up internationalized messages.

### lowsrc

    protected java.lang.String lowsrc

  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 context-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)

### getAlt

    public java.lang.String getAlt()

### setAlt

    public void setAlt(java.lang.String alt)

### getAltKey

    public java.lang.String getAltKey()

### setAltKey

    public void setAltKey(java.lang.String altKey)

### getBorder

    public java.lang.String getBorder()

### setBorder

    public void setBorder(java.lang.String border)

### getBundle

    public java.lang.String getBundle()

### setBundle

    public void setBundle(java.lang.String bundle)

### 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)

### getLocale

    public java.lang.String getLocale()

### setLocale

    public void setLocale(java.lang.String locale)

### getLowsrc

    public java.lang.String getLowsrc()

### 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.
  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.
  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.
  Overrides:
    `release` in class `BaseHandlerTag`

### alt

    protected java.lang.String alt()
                            throws javax.servlet.jsp.JspException

  Return the alternate text to be included on this generated element, or `null` if there is no such text.
  Throws:
    `javax.servlet.jsp.JspException` - if an error occurs

### 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.

  This is based on the way a hyperlink is generated for the LinkTag.

  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
  See Also:
    `LinkTag#hyperlink`

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

Copyright © 2000-2001 - Apache Software Foundation