After installing tomcat following https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-ubuntu-14-04 (Where $CATALINA_HOME=/opt/tomcat)
I added
<Context path="" docBase="/root/mysite/site" debug="0" reloadable="true" />
inside the tag
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
in opt/tomcat/conf/server.xml
However tomcat says:
Caused by: java.lang.IllegalArgumentException: The main resource set specified [/root/mysite/site] is not valid
I've been struggling the whole afternoon. The setup process was from my notes which was recorded just after setting tomcat up on another machine.
doubled checked that /root/mysite/site
is good. All folders are 755.
changed docBase to docBase="/opt/tomcat/webapps/ROOT"
. Tomcat startup successful.
move /root/mysite/site
to /opt/tomcat/webapps/ROOT
. Tomcat startup successful.
The /root
folder is 700. And the guide instructed me to create tomcat's own user & group. My experiment 1 is nonsense. What a horrible mistake!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.