Bug 819112 - tomcat doesn't deploy context file properly
Summary: tomcat doesn't deploy context file properly
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: tomcat
Version: 17
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Ivan Afonichev
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-04 21:24 UTC by Samuel Sieb
Modified: 2012-05-04 21:44 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-05-04 21:44:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.