Bug 819112

Summary: tomcat doesn't deploy context file properly
Product: [Fedora] Fedora Reporter: Samuel Sieb <samuel-rhbugs>
Component: tomcatAssignee: Ivan Afonichev <ivan.afonichev>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: akurtako, ivan.afonichev, java-sig-commits, kdaniel
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-04 21:44:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Samuel Sieb 2012-05-04 21:24:25 UTC
In the WEB-INF folder of my webapp, which I'll call ABC, there is a context.xml containing a jdbc resource.  When tomcat deploys the war file, the context.xml is ignored.  Some research on the web suggested that the context should be in a file called ABC.xml in /etc/tomcat/Catalina/localhost and that tomcat should automatically copy it there.  I copied my context.xml file to that location as ABC.xml and the jdbc resource works.  However, when I deployed a new version of my ABC.war file, the context file in /etc/tomcat/Catalina/localhost was removed and jdbc stopped working again.  I tried naming the file in WEB-INF as ABC.xml instead of context.xml and that didn't make any difference.  There shouldn't be a permissions problem, since tomcat is able to delete files out of the directory.  Am I doing something wrong or is tomcat?

Comment 1 Ivan Afonichev 2012-05-04 21:33:25 UTC
As far as I know context.xml should be placed in META-INF folder. Not in WEB-INF.

Comment 2 Samuel Sieb 2012-05-04 21:44:06 UTC
Yep, sorry, it was me doing it wrong...  Jetty has it's config in the WEB-INF folder, so I wrongly assumed the context.xml would be there too.