<%@ page session="false" %> <%@ taglib uri="http://jakarta.apache.org/taglibs/random-1.0" prefix="rand" %> Example JSP for the Random taglib

Create a random number between 10000000 and 99999999

Create a random float value

Create a random number between 25 and 100

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

Create a random string of all the characters and digits

Get another random string same as above using the jsp:getProperty tag again

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

Create a random string that is the default 8 chars long that uses the charset a-zA-Z0-9

Create a random string 15 lowercase letters long

Create a random string with only caps

Create a random string 10 characters long with the charset a-fF-K ! \\ $ % # ^ \- * ? notice that the - and \ had to be escaped with a \

Get another random string same as above with the jsp:getProperty tag