On Fri, Sep 19, 2014 at 3:33 PM, Miguel Pereira <miguelaperei...@gmail.com> wrote:
> Ahhh, thanks Dan, > > Unfortunately these are 3rd party apps what we receive as a WAR. I am not > sure that unzipping them and rezipping them is ideal nor maintainable. The > main reason is that the context fragments remain after the apps are > undeployed which throw non fatal errors on subsequent tomcat restarts. This > is primarly a problem during development when testing new applications. > > I feel that the way we are undeploying applications is at the heart issue. > The documentation > " > Deleting a WAR file will trigger an undeploy of the application with the > *removal* of any associated expanded directory, *context file* and work > directory. Any current user sessions will not be persisted. > " > Seems to make it clear the the context file is removed but I am > experiencing that is not the case or the third party tool we are using is > not properly undeploying the application. > What version of Tomcat 6 are you using? If it's not the latest one, it would be worth trying the latest version to see if that clears up this trouble. Might also be worth trying a different method of undeploying the application, like the manager or JMX, to see if that removes the context file. Dan > > I'll be doing some more digging, > Miguel > > > > On Fri, Sep 19, 2014 at 2:45 PM, Daniel Mikusa <dmik...@pivotal.io> wrote: > > > On Fri, Sep 19, 2014 at 1:32 PM, Miguel Pereira < > miguelaperei...@gmail.com > > > > > wrote: > > > > > Thank you very much Dan, > > > > > > I looked at the links and noticed I am running tomcat 7 locally and 6 > on > > > our DEV environment. > > > I also noticed that copyXML is present in the documentation for tomcat > 7 > > > and defaults to false. > > > Finally > > > " > > > In an individual file at /META-INF/context.xml inside the application > > > files. In Tomcat 6 this file is *automatically* copied to > > > $CATALINA_BASE/conf/[enginename]/[hostname]/ and renamed to > application's > > > base file name plus a ".xml" extension. (This automated copying became > > > *optional* in Tomcat 7). > > > " > > > > > > Would you happen to know if it is possible to achive the same in tomcat > > 6? > > > ( We will not be upgrading for a while ) > > > > > > > I think the obvious solution would be to remove META-INF/context.xml from > > your WAR file and put any config there into another context configuration > > location, assuming that is an option for you. What is your rationale for > > not wanting it copied? i.e. what is the problem that copying it causes? > > Maybe there is another way to resolve that problem. > > > > Dan > > > > > > > > > > > > > > > Miguel > > > > > > On Fri, Sep 19, 2014 at 12:41 PM, Daniel Mikusa <dmik...@pivotal.io> > > > wrote: > > > > > > > On Fri, Sep 19, 2014 at 12:28 PM, Miguel Pereira < > > > > miguelaperei...@gmail.com> > > > > wrote: > > > > > > > > > Hey all, > > > > > > > > > > I was wondering where I could get some more information about these > > xml > > > > > files. On one system they are created every time I deploy a web > > > > application > > > > > and on another they are not.. I would prefer that tomcat does not > > > create > > > > > them. Anyone want to point me in the right direction? > > > > > > > > > > > > > Some explanation of these files can be found here. > > > > > > > > > > > > > > http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Introduction > > > > > > > > > > > > > > > > > > http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Defining_a_context > > > > > > > > See also the "copyXML" attribute further down on that page. That > could > > > be > > > > why you're seeing these files show up. > > > > > > > > Dan > > > > > > > > > > > > > > > > > Thank you, > > > > > Miguel > > > > > > > > > > > > > > >