Declarative:
Servlet Context Initialization parameters (I hope I got the term correct).
Programmatic:
Static final members in a Java class.
The second is just the basic method in Java (and unimportantly, slightly faster). Of course it locks you into compile-time values. Go with the first approach unless you need something different.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.