I have just installed Tomcat 7 for my JSP projects via apt-get so it is installed as a service. I am using Ubuntu 14.10 LTS
I run this code to install everything about Tomcat 7.0.61
sudo apt-get install tomcat7 tomcat7-docs tomcat7-examples tomcat7-common tomcat7-admin tomcat7-user
Then I found that there is tomcat7, tomcat7-docs, tomcat7-examples, and tomcat7-admin installed in /usr/share folder
This makes me completely confused cuz I can run examples and docs via the url http://localhost:8080/examples or http://localhost:8080/docs
Note that the examples and docs folders are in /usr/share. So I feel like the /usr/share folder is my web root for Tomcat 7 because those folders are in there.
However, in /var/lib/tomcat7/, there is webapps folder but when I try putting file in the folder, the file is not working at all.
So anyone can explain where the webapps or root folder for Tomcat is? and how to properly set the path for the web root folder?
tomcat webapps root is /var/lib/tomcat7/webapps/
and you may want to set a soft link to it in /usr/share/tomcat7
:
cd /usr/share/tomcat7/
ln -s /var/lib/tomcat7/webapps/ .
and same for conf
cd /usr/share/tomcat7
ln -s /var/lib/tomcat7/conf/ .
and for log
:
cd /usr/share/tomcat7
ln -s /var/log/tomcat7 .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With