org.apache.taglibs.application
Class InitParametersTag

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--javax.servlet.jsp.tagext.BodyTagSupport
              |
              +--org.apache.taglibs.application.InitParametersTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class InitParametersTag
extends javax.servlet.jsp.tagext.BodyTagSupport

JSP Tag initParameters, used to get init parameters information using the standard JSP 1.2 <jsp:getProperty> tag.

The script variable of name id is available only within the body of the initParameters tag.

Loops through all the init parameters in the ServletContext.

JSP Tag Lib Descriptor

 <name>initParameters</name>
 <tagclass>org.apache.taglibs.application.InitParametersTag</tagclass>
 <teiclass>org.apache.taglibs.application.InitParametersTEI</teiclass>
 <bodycontent>JSP</bodycontent>
 <info>Loop through all initParameters or get a single initParameter.</info>
   <attribute>
     <name>id</name>
     <required>true</required>
     <rtexprvalue>false</rtexprvalue>
   </attribute>
 

Author:
Morgan Delagrange
See Also:
Serialized Form

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
InitParametersTag()
           
 
Method Summary
 int doAfterBody()
          Method called at end of each initParmaeters tag.
 int doEndTag()
          Method called at end of Tag
 int doStartTag()
          Loops through all the init parameters in the current ServletContext.
 java.lang.String getName()
          Returns the name of the init parameter.
 java.lang.String getValue()
          Returns the value of the init parameter.
 void setName(java.lang.String name)
          Set the name of the init parameter to get.
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, release, 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
 

Constructor Detail

InitParametersTag

public InitParametersTag()
Method Detail

doStartTag

public final int doStartTag()
                     throws javax.servlet.jsp.JspException
Loops through all the init parameters in the current ServletContext.
Overrides:
doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
Returns:
SKIP_BODY if no init parameters are found, EVAL_BODY_TAG if an init parameter exists

doAfterBody

public final int doAfterBody()
                      throws javax.servlet.jsp.JspException
Method called at end of each initParmaeters tag.
Overrides:
doAfterBody in class javax.servlet.jsp.tagext.BodyTagSupport
Returns:
EVAL_BODY_TAG if there is another init parameter, or SKIP_BODY if there are no more init parameters

doEndTag

public final int doEndTag()
                   throws javax.servlet.jsp.JspException
Method called at end of Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
Returns:
EVAL_PAGE

getName

public final java.lang.String getName()
Returns the name of the init parameter.

<jsp:getProperty name="id" property="name"/>

Returns:
String - init parameter name

setName

public final void setName(java.lang.String name)
Set the name of the init parameter to get.

Parameters:
String - - init parameter name

getValue

public final java.lang.String getValue()
Returns the value of the init parameter.

<jsp:getProperty name="id" property="value"/>

Returns:
String - value of the init parameter


Copyright ? 2000 Apache Software Foundation. All Rights Reserved.