catlett 01/08/14 11:31:52
Modified: random/examples/web random.jsp
Log:
the random taglib can now use either a SecureRandom or a Random object to create the
required random number or string
Revision Changes Path
1.4 +14 -0 jakarta-taglibs/random/examples/web/random.jsp
Index: random.jsp
===================================================================
RCS file: /home/cvs/jakarta-taglibs/random/examples/web/random.jsp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- random.jsp 2001/08/13 23:45:36 1.3
+++ random.jsp 2001/08/14 18:31:52 1.4
@@ -20,6 +20,13 @@
<jsp:getProperty name="num25" property="random"/></p>
+ <p>Create the same random number between 25 and 100, only use the
+ algorithm and provider attributes to indicate the use of a SecureRandom
+ object instead of a Random object<br/>
+ <rand:number id="num25sec" range="25-100" algorithm="SHA1PRNG"
provider="SUN"/><br/>
+
+ <jsp:getProperty name="num25sec" property="random"/></p>
+
<p>Create a random string of all the characters and digits<br/>
<rand:string id="random1" charset="all"/><br/>
@@ -28,6 +35,13 @@
<p>Get another random string same as above using the jsp:getProperty tag
again<br/>
<br/><jsp:getProperty name="random1" property="random"/></p>
+
+ <p>Create the same random string of all the characters and digits, only use
+ the algorithm and provider attributes to indicate the use of a SecureRandom
+ object instead of a Random object<br/>
+ <rand:string id="random1sec" charset="all" algorithm="SHA1PRNG"
provider="SUN"/><br/>
+
+ <jsp:getProperty name="random1sec" property="random"/></p>
<p>Create a random string that is the default 8 chars long that uses the
charset a-zA-Z0-9<br/>