Reputation: 23780
I have created a folder called webappsx under Tomcat folder and added a file called sample.war in it.
I have this entry in server.xml:
<Host name="otherhost" appBase="webappsx" unpackWARs="true" autoDeploy="true" />
And I have also edited my hosts file so that I could test in my local.
When I go to
http://otherhost:8081/sample/
I see the application running fine. Up to here it is all good. But I want to be able to see the application when I visit
http://otherhost:8081
So what I am trying is:
<Host name="otherhost" appBase="webappsx/sample" unpackWARs="true" autoDeploy="true" />
But this does not seem to work. A "Not Found" is returned from the server. Why?
Upvotes: 0
Views: 176
Reputation: 12453
You need to deploy the application in the ROOT directory. Call the file ROOT.war before deployment and use:
<Host name="otherhost" appBase="webappsx" unpackWARs="true" autoDeploy="true" />
Upvotes: 1