Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to make my tomcat webapp the default one (on / instead of /myWebapp).

Since I don't want to move the webapp folder (for various reasons), I followed Method 2.2 in the Tomcat wiki.

Now my Engine tag in server.xml looks as follows:

<Engine name="Catalina" defaultHost="localhost">
  <Realm className="org.apache.catalina.realm.LockOutRealm">
    <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
           resourceName="UserDatabase"/>
  </Realm>

  <Host appBase="webapps"
              autoDeploy="false"
              deployOnStartup="false"
              deployXML="true"
              name="localhost"
              unpackWARs="false">
    <Context path="" docBase="magnoliaPublic" debug="0"/>
    <Context path="/author" docBase="magnoliaAuthor" debug="0"/>
    <Valve className="org.apache.catalina.valves.AccessLogValve"
                   directory="logs"
                   pattern="%h %l %u %t &quot;%r&quot; %s %b"
                   prefix="localhost_access_log."
                   suffix=".txt"/>
  </Host>
</Engine>

magnoliaAuthor now appears at /authoras expected, but when going to the main page (/), I still see the static page of ROOT. Am I missing something here?

UPDATE: Removing the whole ROOT webapp from the webapps folder solved the problem. But why didn't it work before?

share|improve this question
    
When exactly was Tomcat stopped and started in amongst these configuration changes? –  Mark Thomas Oct 12 '13 at 16:36
    
Stopped and started after every change. –  Cedric Reichenbach Oct 12 '13 at 17:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.