This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: JSTL: $Math.random()
 
jQuery in Action, 3rd edition