jQuery in Action, 2nd edition*
The moose likes JSP and the fly likes JSTL: $Math.random() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL: $Math.random()" Watch "JSTL: $Math.random()" New topic
Author

JSTL: $Math.random()

Garrett Smith
Ranch Hand

Joined: Jun 27, 2002
Posts: 401
This is always false


What is the correct syntax?


comp.lang.javascript FAQ: http://jibbering.com/faq/
vidya archana
Ranch Hand

Joined: Oct 29, 2002
Posts: 36
Try this
<c:when test='${Math.random() ge .5}'>

Garrett Smith
Ranch Hand

Joined: Jun 27, 2002
Posts: 401
When using
I get the error message "encountered '('"
With
The test is always false.
Garrett Smith
Ranch Hand

Joined: Jun 27, 2002
Posts: 401
Why is ${Math.random ge .01} always false?
It should be true 99% of the time.
Garrett Smith
Ranch Hand

Joined: Jun 27, 2002
Posts: 401
.
Garrett Smith
Ranch Hand

Joined: Jun 27, 2002
Posts: 401
^
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSTL: $Math.random()
 
Similar Threads
Random Method
Algorithm to generate random token ids.
Generating random numbers
java graphic problem
random colour problems