I am using context in Java web application deployed on Tomcat (JBossEWS) on Openshift.
I look it up like this:
Context context = new InitialContext();
Context envContext = (Context) context.lookup("java:comp/env");
This works on my local Tomcat 7 but I get
javax.naming.NameNotFoundException: Name [comp/env] is not bound in this Context. Unable to find [comp].
when it is deployed to Openshift. I thought that comp/env is available by default.
Do I need to initialize it somehow?
How can I make it work?
Aucun commentaire:
Enregistrer un commentaire