We have constants declared in an interface in our application like this.
public interface IConstants { public static final String FEVER='6'; public static final String HEADACHE='8'; }
We now want to populate these constants values (6 and 8) from the database (or application servlet context).
The database values stored in a look up table are already available in the application session (in servlet context attribute) and hence I don’t have to make a database call every time.
How do we accomplish this?
Given that you don’t want to change the existing code too much, the simplest way would be: