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:
installed tomcat 8.5.8
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>
deployed myApp.war under /opt/tomcat/webapps
started tomcat
check directory /opt/tomcat/webapps and found following content
-ROOT -docs -examples -host-manager -manager -myApp myApp.war
check /opt/tomcat/logs and found no error during startup
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.