Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The easiest approach to getting root context would be to simply rename your app's directory from <code>webapps/site</code> to <code>webapps/ROOT</code> and restart Tomcat. If there's already a ROOT app in your default <code>webapps</code> folder, then you need to create another Host, because there may be only one root context app per Host.</p> <p>Another option (again, if you don't already have a ROOT app under <code>webapps</code>) would be to edit your <code>conf/server.xml</code> file and add your context element within the default <code>&lt;Host&gt;</code>:</p> <pre><code>&lt;Context path="" docBase="site" /&gt; </code></pre> <p>If you'd like to create a separate host, then you'll need to define a second <code>&lt;Host&gt;</code> in <code>server.xml</code>, e.g.,</p> <pre><code>&lt;Host name="anotherhost" appBase="webapps_anotherhost"&gt;&lt;/Host&gt; </code></pre> <p>For the above to work, you'd need to create a <code>webapps_anotherhost</code> folder as a sibling folder next to your default host's <code>webapps</code> folder, and then drop your WAR in that folder, either as an exploded directory named <code>ROOT</code> or a compressed WAR named <code>ROOT.war</code>. Then restart Tomcat and browse your application at <code>http://anotherhost:8080</code> (you'll also a hosts file entry, of course).</p> <p>These are just a few of the many options. The Tomcat docs are fairly detailed about this stuff. You can find the docs for your version of Tomcat at <a href="http://tomcat.apache.org/" rel="noreferrer">http://tomcat.apache.org/</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload