Reading env-entries from application.xml
Hi,
I have an EAR file which consists of a JAR (for EJB components) and WAR files. I want to set some globals settings which can be reached by both EJB and Servlet layers.
The natural place seems to be application.xml and I've added the following lines into it:
<env-entry>
<env-entry-name>StaticContentDir</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>/src/static</env-entry-value>
</env-entry>
But I can't read it and found no help in this forum and Google.
The following lines didn't work either.
dir = (String) new InitialContext().lookup("java:comp/env/StaticContentDir");
Is there any wise way to read this, or do I have to duplicate it on ejb-jar.xml and web.xml?
Regards

