org.apache.taglibs.request
Class ParametersTag
java.lang.Object
|
+--javax.servlet.jsp.tagext.TagSupport
|
+--javax.servlet.jsp.tagext.BodyTagSupport
|
+--org.apache.taglibs.request.ParametersTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.BodyTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag
- public class ParametersTag
- extends javax.servlet.jsp.tagext.BodyTagSupport
JSP Tag parameters, used to get HttpServletRequest parameter information
using the standard JSP <jsp:getProperty> tag.
The script variable of name id is availble only within the
body of the parameters tag.
Loops through all the parameters received by the HttpServletRequest.
If the optional attribute name is present only the parameter of
that name is retreived.
JSP Tag Lib Descriptor
<name>parameters</name>
<tagclass>org.apache.taglibs.request.ParametersTag</tagclass>
<teiclass>org.apache.taglibs.request.ParametersTEI</teiclass>
<bodycontent>JSP</bodycontent>
<info>Used to loop through all parameters or get a single parameter.</info>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
- Author:
- Glenn Nielsen
- 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 |
|
Method Summary |
int |
doAfterBody()
Method called at end of each parameters tag. |
int |
doEndTag()
Method called at end of Tag |
int |
doStartTag()
Gets the parameters that came with the request or parameter with name. |
java.lang.String |
getName()
Returns the name of the parameter. |
java.lang.String |
getValue()
Returns the value of the parameter. |
void |
setName(java.lang.String str)
Set the optional tag attribute name. |
| 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 |
ParametersTag
public ParametersTag()
doStartTag
public final int doStartTag()
throws javax.servlet.jsp.JspException
- Gets the parameters that came with the request or parameter with name.
- Overrides:
doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
- Returns:
- SKIP_BODY if no parameters or parameter with name is not found, EVAL_BODY_TAG if parameter exists
doAfterBody
public final int doAfterBody()
throws javax.servlet.jsp.JspException
- Method called at end of each parameters tag.
- Overrides:
doAfterBody in class javax.servlet.jsp.tagext.BodyTagSupport
- Returns:
- EVAL_BODY_TAG if there is another parameter, or SKIP_BODY if there are no more parameters or this is a named parameter
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
setName
public final void setName(java.lang.String str)
- Set the optional tag attribute name.
- Parameters:
String - name of HTTP input parameter
getName
public final java.lang.String getName()
- Returns the name of the parameter.
<jsp:getProperty name="id" property="name"/>
- Returns:
- String - parameter name
getValue
public final java.lang.String getValue()
- Returns the value of the parameter.
<jsp:getProperty name="id" property="value"/>
- Returns:
- String - value of the parameter
Copyright ? 2000 Apache Software Foundation. All Rights Reserved.