This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes How to read tomcat-environment entries in Java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to read tomcat-environment entries in Java?" Watch "How to read tomcat-environment entries in Java?" New topic
Author

How to read tomcat-environment entries in Java?

starki fox
Greenhorn

Joined: Jul 20, 2005
Posts: 15
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

Joined: Jul 20, 2005
Posts: 15
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"/>
 
 
subject: How to read tomcat-environment entries in Java?
 
Similar Threads
My classpath doesn't stay upon reboot
heap space setting for Tomcat on Linux
where can I see Classpath of Tomcat 5?
How to run Servlets
Tomcat Servlet/Bean 500 Error