org.apache.taglibs.random
Class RandomNumTag

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--org.apache.taglibs.random.RandomNumTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.Tag

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

The RandomNumTag will set up a random number generator which can be accessed by the jsp:getProperty tag. <tag> <name>randomnum</name> <tagclass>org.apache.taglibs.random.RandomNumTag</tagclass> <bodycontent>empty</bodycontent> <info>Creates a variable length random number generator</info> <attribute> <name>id</name> <required>true</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>range</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>algorithm</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>provider</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag>

Version:
1.0
Author:
Rich Catlett
See Also:
Serialized Form

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
RandomNumTag()
           
 
Method Summary
 int doStartTag()
          implementation of method from the Tag interface that tells the JSP what to do upon encountering the start tag for this tag set
 void setAlgorithm(java.lang.String value)
          set the algorithm name
 void setProvider(java.lang.String value)
          set the provider name
 void setRange(java.lang.String value)
          set the Range
 
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
 

Constructor Detail

RandomNumTag

public RandomNumTag()
Method Detail

doStartTag

public final int doStartTag()
                     throws javax.servlet.jsp.JspException
implementation of method from the Tag interface that tells the JSP what to do upon encountering the start tag for this tag set
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Returns:
SKIP_BODY - integer value telling the JSP engine to not evaluate the body of this tag
Throws:
javax.servlet.jsp.JspException - thrown when error occurs in processing the body of this method

setRange

public final void setRange(java.lang.String value)
                    throws javax.servlet.jsp.JspException
set the Range
Parameters:
value - String value that determines range from which the random number will be chosen
Throws:
javax.servlet.jsp.JspException - if the lowerbound is greater than the upperbound

setAlgorithm

public final void setAlgorithm(java.lang.String value)
set the algorithm name
Parameters:
value - name of the algorithm to use for a SecureRandom object

setProvider

public final void setProvider(java.lang.String value)
set the provider name
Parameters:
value - name of the package to check for the algorithm


Copyright ? 2000 Apache Software Foundation. All Rights Reserved.