0

i know there are several topics about this, but after days i am not able to localize and solve this problem. the steps i've done so far:

  1. installed tomcat 8.5.8

  2. changed the following lines in /opt/tomcat/conf/server.xml

    <Host name="www.myApp.com"  appBase="/opt/tomcat/webapps"  unpackWARs="true" autoDeploy="false">
      <Alias>myApp.com</Alias>     
      <Context path="" docBase="/opt/tomcat/webapps/myApp" debug="0" reloadable="true"/>
    </Host>
    
  3. deployed myApp.war under /opt/tomcat/webapps

  4. started tomcat

  5. check directory /opt/tomcat/webapps and found following content

    -ROOT
    -docs
    -examples
    -host-manager
    -manager
    -myApp
    myApp.war
    
  6. check /opt/tomcat/logs and found no error during startup

  7. open page www.myApp.com in browser

well, i see the welcome page of myApp, but all resources (.css, .js,...) are not loaded, because /myApp is still present in the src-attribute

<script type="text/javascript" src="/myApp/javax.faces.resource/jquery/jquery.min.js"></script>
<link type="text/css" rel="stylesheet" href="/myApp/javax.faces.resource/main.css">

instead it should be:

<script type="text/javascript" src="/javax.faces.resource/jquery/jquery.min.js"></script>
<link type="text/css" rel="stylesheet" href="/javax.faces.resource/main.css">

is there anything important i'm missing? thanks in advance.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Steve
  • 384
  • 1
  • 7
  • 17

1 Answers1

0

with regard to the comments the following changes made it work:

  1. renamed Tomcats ROOT-Folder to ROOT_TEMP
  2. deleted /opt/tomcat/webapps/myApp and /opt/tomcat/webapps/myApp.war
  3. uncomment in server.xml

    <!--Context path="" docBase="/opt/tomcat/webapps/myApp" debug="0" reloadable="true"/-->
    
  4. deploy myApp as "ROOT.war"
Steve
  • 384
  • 1
  • 7
  • 17