Bug 819112 - tomcat doesn't deploy context file properly
tomcat doesn't deploy context file properly
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: tomcat (Show other bugs)
17
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Ivan Afonichev
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-04 17:24 EDT by Samuel Sieb
Modified: 2012-05-04 17:44 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-04 17:44:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Samuel Sieb 2012-05-04 17:24:25 EDT
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 17:33:25 EDT
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 17:44:06 EDT
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.