Is it possible to generate a random integer in Freemarker template?
Freemarker does not provide a random number generator at the moment. You can implement a naive random number generator using the time ( .now ) as a seed, but it should never be a critical part of your program.
You can generate a random integer in Java and pass this integer to the Freemarker template.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With