tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Problem deploying WAR with META-INF/context.xml file (probably a bug) with Tomcat 5 (for W2K)
Date Thu, 26 Aug 2004 12:58:33 GMT

This is a known bug in 5.0.27.  You can use 5.0.25 which has correct
behavior here.  I've also already patched the bug in CVS, and I'll cut
out a 5.0.28 release in a few days which will have the fix.

Yoav Shapira
Millennium Research Informatics

>-----Original Message-----
>From: Daniel CAMPI []
>Sent: Thursday, August 26, 2004 5:03 AM
>Subject: Problem deploying WAR with META-INF/context.xml file (probably
>bug) with Tomcat 5 (for W2K)
>I'm just discovering Tomcat 5, and I've been spending almost all day
>to find a solution to deploy a WAR packaged servlet that has to connect
>itself to a global data source resource (ORACLE database).
>To set up the connections, I first did the things manually. From within
>web Administration Tool I executed the followin actions:
>a) I configured a GLOBAL [Data Source] resource
>b) I declared a local (CONTEXT or application specific) [Resource Link]
>pointing to the GLOBAL [Data Source]
>Great, everything works fine so far: I can see my data !
>But then, I thought, it would be great if I could separate server
>tasks (like declaring GLOBAL resources) from servlet specific tasks
>declaring local links to these external resources). So, I could have a
>global resource called [MyGlobalDatabase] that could be configured in
>different ways on different Tomcat servers (on a test server, this
>could point to a test database...).
>On the other hand, the only thing my servlets should be aware of, is
>they will find a global resource called [MyGlobalDatabase] on their
>server. They don't need to know what's the actual configuration behind
>resource name, but they need to know how to connect to that resource.
>is specially important during servlet deployment: I would like to
>servlets  in a way that no manual intervention is required by the
>server administrator (except, of course, loading the *.WAR package) !
>So I read all the documentation I could find about this topic, and I
>discovered that it was possible to define context specific resources
>within a *.WAR file. All I was supposed to do, was to create a
>directory containing a [context.xml] file, and declare my links from
>that file !
>I followed all the steps, but when I deployed my *.WAR file, the link
>not set up correctly. I checked the CONTEXT specific resources of my
>from within the Administration Tool, and there wasen't any link
>So I had a look at my ${tomcat_root}\conf\Catalina\localhost directory
>see if my [myservlet.xml] file was there, and here comes the surprise:
>There was indeed something called [myservlet.xml]  at that place: but
>wasn't an *.xml file... It was an empty directory !!!!!!!
>My question: did someone already succeed in deploying a servlet using a
>/META-INF/context.xml file with Tomcat 5 (OS: W2K), or is this a known
>and all I can do is to wait for a new release of Tomcat ?
>Thank you very much for your help,
>D. Campi
>To unsubscribe, e-mail:
>For additional commands, e-mail:

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message