Ich möchte meine App als root-App bereitstellen, also habe ich meinen Krieg in ROOT.war umbenannt. Standard server.xml sieht so aus -Tomcat 7 nicht automatisch entpacken Krieg
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
Ich muss auch etwas statischen Inhalt dienen. Also habe ich Context tag-
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<Context docBase="/home/athakur/Documents/UI" path="/" />
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
hinzugefügt Ich möchte statischen Inhalt von diesem Pfad und apis von meinem ROOT.war dienen. Aber sobald ich das Kontextelement ROOT.war hinzufüge, wird es nicht erweitert und bereitgestellt. Wenn ich den Kontextpfad entferne, tut es das. Auch die Benutzeroberfläche wird korrekt vom Pfad nach dem Hinzufügen des Kontext-Tags gerendert. Also möchte ich dieses Verhalten auch nicht ändern.