Bug 20608

Summary: context.xml not bound from WAR file
Product: Tomcat 4 Reporter: Michael O. Duffy <duffymo>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Severity: enhancement    
Priority: P3    
Version: 4.1.24   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Michael O. Duffy 2003-06-09 13:30:30 UTC
This isn't a bug, per se, but it is a wish.

I've successfully deployed a Web app that has a JDNI data source defined in its 
context.xml using the Ant <deploy> task.  The WAR file has context.xml in the 
meta-inf directory.

But when I deploy the app by putting the WAR file in the TOMCAT_HOME/webapps 
directory, the app fails because the JDNI data source isn't bound.

There's a workaround I found at O'Reilly:


However, it would be nice if the app could get the context.xml info if it finds 
it in the WAR file's meta-inf directory.  No steps required beyond dropping the 
WAR file into the webapps directory.  Thanks - MOD
Comment 1 Mark Thomas 2004-04-25 13:57:23 UTC
Not a bug but a wish = enhancement.
Comment 2 skyfox 2006-01-27 11:29:36 UTC
(In reply to comment #1)
> Not a bug but a wish = enhancement.

I thing *IT IS A BUG*
simply the catalina-ant's deploy task doesn't respect the config attribute;
here's the code from 5.5.15:

if ((war == null) && (config != null)) {
                sb.append(URLEncoder.encode(config, getCharset()));
Comment 3 Mark Thomas 2010-12-17 09:07:48 UTC

*** This bug has been marked as a duplicate of bug 42747 ***