title: Tomcat vs Weblogic JNDI Lookup
body: <p>The Weblogic servers we are using have been configured to allow JNDI datasource names like "appds".</p>
  
  <p>For development (localhost), we might be running Tomcat and when declared in the &lt;context&gt; section of server.xml, Tomcat will hang JNDI datasources on "java:comp/env/jdbc/*" in the JNDI tree.</p>
  
  <p><strong>Problem:</strong> in Weblogic, the JNDI lookup is "appds" whilst in Tomcat, it seems that that I must provide the formal "java:comp/env/jdbc/appds". I'm afraid the Tomcat version is an implicit standard but unfortunately, I can't change Weblogic's config ... so that means we end up with two different spring config files (we're using spring 2.5) to facilitate the different environments.</p>
  
  <p>Is there an elegant way to address this. Can I look JNDI names up directly in Tomcat? Can Spring take a name and look in both places? Google searches or suggestions would be great.</p>