DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16116>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16116 ResourceLink does not work within DefaultContext Summary: ResourceLink does not work within DefaultContext Product: Tomcat 4 Version: 4.1.19 Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Catalina:Modules AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Given the (condensed) server.xml snippet: <Server port="8005" shutdown="SHUTDOWN" debug="0"> <GlobalNamingResources> <Environment name="simpleValue" type="java.lang.Integer" value="30"/> </GlobalNamingResources> <Service name="Tomcat-Standalone"> <Engine name="Standalone" defaultHost="localhost" debug="0"> <DefaultContext> <ResourceLink name="defaultSimpleValue" global="simpleValue" type="java.lang.Integer"/> </DefaultContext> ... With a test JSP: <%@ page contentType="text/plain" import="java.io.*,javax.naming.*" %> <% Context ctx = null; try { ctx = new InitialContext(); Integer defaultSimpleValue = (Integer)ctx.lookup("java:comp/env/defaultSimpleValue"); out.println("defaultSimpleValue = " + defaultSimpleValue); } catch (Exception exc) { exc.printStackTrace(new PrintWriter(out)); } finally { if (ctx != null) { try { ctx.close(); } catch (NamingException exc) { exc.printStackTrace(new PrintWriter(out)); } } } %> Results in: javax.naming.NameNotFoundException: Name defaultSimpleValue is not bound in this Context -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>