I'm using tomcat6. If what is written in tomcat docs is not inconsistent then why I am not able to set an explicit context for my web application by the following entries in myapp.xml (placed at /conf/Catalina/localhost)
<Context path="" docBase="myapp" debug="0" privileged="true" /> You have written that docbase attribute is redundant if application is situated in <Host> appBase directory and path attribute must not be used, but it is the path attribute, where we specify the context we want to use for our web application. Also, it is the docbase attribute that specifies, for which web application (present under appBase folder) will the context apply. I have been trying to understand how to explicitly define contexts in tomcat, read tomcat docs and searched a lot on net but none seems to provide me complete understanding of it. I would like to mention here certain things in case of tomcat6 : 1. Trying to set explicit context using myapp.xml placed under (/conf/Catalina/localhost) doesn't set the context. 2. We can also set context using server.xml but tomcat docs strongly recommend not to se it. It says that: "This is because it makes modifying the Context configuration more invasive since the main conf/server.xml file cannot be reloaded without restarting Tomcat." But what are the drawbacks of this approach? 3. Placing context.xml in META-INF folder also doesn't set the context. Is there any other way also to set explicit contexts? I do not want to deploy my application twice or rename any folder. It will be great if anyone could answer the above queries. -----Original Message----- From: Charles Caldarale [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2008 6:55 PM To: Tomcat Users List Subject: Re: Setting context in tomcat6 On Jul 18, 2008, at 2:12, "vibhuti" <[EMAIL PROTECTED]> wrote: > This is mentioned in tomcat documentation and I just followed what was > written there. Here is the link: > http://tomcat.apache.org/tomcat-6.0-doc/config/context.html > If this is erroneous then renaming or using filter are the only ways? It's neither erroneous nor inconsistent with what you've already been told. Besides the section of the doc that you quoted, read the descriptions of the path and docBase attributes. Note that you must not use a path attribute here, and the docBase attribute is redundant (ignored, at best) when the app is located in the <Host> appBase directory. - Chuck --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]