Kiran,
On 11.9.2014 5:52, Kiran Badi wrote:
I am trying to deploy application as ROOT.war in tomcat 7.50 provided by
hosting service provider, but for some reasons I get below message
FAIL - War file "ROOT.war" cannot be uploaded if context is defined in
server.xml
I have below in server xml,
Host name="Myapp.com" appBase="path to public_html folder">
<Alias>www.myapp.com</Alias>
<Alias>myuserid.myhostingprovider.com</Alias>
<Context path="" reloadable="true" docBase=" path to
public_html" debug="1"/>
<Context path="/manager" debug="0" privileged="true"
docBase="path to /tomcat/webapps/manager">
</Context>
</Host>
You seem to specify the same directory for Host's appBase and Context's
docBase. That is wrong.
AppBase is a place where you will be putting your web applications (.war
files or directories). On default Tomcat installation that is "webapps"
directory.
DocBase is a place where single web application resides. It may be
relative to AppBase (e.g. "ROOT"), or absolute (e.g.
"/usr/local/tomcat/webapps/ROOT").
The two should not point to the same directory.
Next, configuring contexts in server.xml is not recommended [1]. You
should remove <Context> elements from your server.xml, and move them to
/META-INF/context.xml in web applications. If you do that, also remove
docBase attributes.
-Ognjen
[1]
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Defining_a_context
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org