Where is the root of Tomcat7 WEB in Ubuntu 14

I 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 the tomcat7, tomcat7-docs, tomcat7-examples, and tomcat7-admin files are installed in the / usr / share folder.

This completely bothers me, because I can run examples and documents via the url http: // localhost: 8080 / examples or http: // localhost: 8080 / docs

Note that the folders for examples and documents are located in / usr / share. Therefore, I feel that the / usr / share folder is my web root for Tomcat 7, because these folders are there.

However, in / var / lib / tomcat 7 /, there is a webapps folder, but when I try to put a file in a folder, the file does not work at all.

So, can anyone explain where the web folder or root folder for Tomcat is located? and how to set the path for the root folder on the Internet?

+4
source share
3 answers

tomcat webapps root - /var/lib/tomcat7/webapps/and you can set the link in it /usr/share/tomcat7:

cd /usr/share/tomcat7/
ln -s /var/lib/tomcat7/webapps/ . 

and the 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 .
+7
source

Well, you can find the tomcat installation,

/usr/share/tomcat7 

Or another thing you can do is download the [tar.gz] Tomcat package. Then unzip it with the following command

tar xvzf apache-tomcat-7.0.61.tar.gz

After that, move the same to the required directory / usr / share / tomcat 7 with

sudo mv apache-tomcat-7.0.61/ /usr/share/tomcat7

tomcat , , tomcat "catalina.sh", tomcat7/bin. , :

sudo gedit /usr/share/tomcat7/bin/catalina.sh

, Tomcat 7 , Tomcat, !

+4

You have three main directories for Tomcat:

  • /etc/tomcat7 for configuration

  • /etc/tomcat7 for a runtime called CATALINA_HOME

  • /usr/share/tomcat7-root for webapps

An alternate path to Tomcat called CATALINA_BASE is /var/lib/tomcat7

+3
source

All Articles