I have a class called Constants.java that contains a number of static final constants.
When I try accessing them by ${Constants.CONST_NAME}, nothing is returned. I have also tried creating a getCONST_NAME() method in the class but this does not return anything either.
If I use <%= Constants.CONST_NAME %> the correct value is returned.
Is the root of my problem that I have missed something, or can it be some kind of setting on my Tomcat server I have not set?
I'm using Tomcat 5.0.27.
Thanks
Stefan Evans
Bartender
Joined: Jul 06, 2005
Posts: 1005
posted
0
Nope you haven't missed anything.
The getCONST_NAME() method should work though, as long as it is not static. ie public String getCONST_NAME();