I have in my web.xml:
<env-entry>
<description>
Sets the logging context for the Change Form Application
</description>
<env-entry-name>logging-context</env-entry-name>
<env-entry-value>/totwcf</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
loggingContextName = (String) envCtx.lookup("logging-context");
System.out.println("Found JDNIRS: java:comp/env");