This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to read tomcat-environment entries in Java?

 
starki fox
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

could someone give my a hint how to read out a global
tomcat environment variable.
Do you have to use JNDI?

Thanks a lot
 
starki fox
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
could you tell me where the error is?

Context initCtx = new InitialContext();
Context envCtx = (Context)initCtx.lookup("java:comp/env");
Object o = envCtx.lookup("ehl");



<GlobalNamingResources>
<Environment name="ehl" type="java.lang.Boolean" value="false"/>
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic