I'd like to use a ServletFilter that reads it configuration from the java:comp/env/ JNDI namespace. As the value will be different on devel and production servers, it should not be hardcoded via in web.xml but instead be configured in the application server.
I already tried the following places but none seemed to be right:
- System Properties
- Web Container / General Properties
- JVM Settings / Additional Properties (suggested in How to set an env variable in Glassfish 2.1)
- Resource Connectors (didn't work)
- asenv.conf (only in Glassfish 2?)
How can I set a custom JNDI variable in Glassfish 4.1?