Is there is a way to reuse public static final constants defined inside Java classes with the javascript files ?
Or is there a better way to define such constants so that they can be reused by both java & JavaScript ?
A very simple solution would be to store your config as JSON on the server side, then have the server inject that into the HTML response to the client.
The server can read the JSON on startup and keep it in a singleton object.
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