Ok I fixed this issue. Moved the context tag to context.xml and deployed it as ROOT. Works fine now.
However I have another application which I will be deploying in the same tomcat. This will be basically myapp2.war ,so how do I manage this deployment so that whenever someones gives www.myapp2.com, it should open up ? I assume we cannot have 2 root deployment in the same tomcat. On Thu, Sep 11, 2014 at 9:29 PM, Kiran Badi <ki...@poonam.org> wrote: > Ok I made the changes, and trying. > > Andre, I tried your approach, it still same error.Making changes to server > xml now. > > Pointing appBase to webapps. > > Question I have is that if I upload war file via manager app, where does > it go ? > > I can understand that ROOT goes to the ROOT folder if I delete the root > folder, how about myapp.war ? > > Does it go to work folder ? > > Konstantin, I have below version only difference is that localhost is on > windows and not working one is on linux. > > Apache Tomcat/7.0.501.7.0_51-b13Oracle CorporationWindows Vista6.0x86 > > On Thu, Sep 11, 2014 at 4:32 AM, Ognjen Blagojevic < > ognjen.d.blagoje...@gmail.com> wrote: > >> 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 >> >> >