I wrote a servlet that creates an InitialContext then performs a lookup (it's getting a DataSource from the app server). The server is iPlanet. While researching using Tomcat with DataSources, a co-worker noted that most of the Tomcat examples included "java:comp/env" in the lookup, where mine does not. Is the "java:comp/env" the default if you don't specify it? Does it even need to be there for Tomcat? Should I add it to the iPlanet code 'to be safe'? Is adding this only useful for doing lookups on EJBs and other resources? Do other servlet engines and app servers have requirements for the string to be there as part of the lookup? Any explanation or pointers would be useful. Thanks!
CJP (Certifiable Java Programmer), AMSE (Anti-Microsoft Software Engineer)
Author of Posts in the Saloon