• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL: $Math.random()

 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is always false


What is the correct syntax?
 
vidya archana
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this
<c:when test='${Math.random() ge .5}'>

 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When using
I get the error message "encountered '('"
With
The test is always false.
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why is ${Math.random ge .01} always false?
It should be true 99% of the time.
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
.
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
^
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic