File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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
^
 
Consider Paul's rocket mass heater.
 
subject: JSTL: $Math.random()