Refer to https://blog.csdn.net/hushui/article/details/82732412
1. Environment RHEL7.x
lake@localhost:~/java/servlet/MyServlet$ cat /proc/version
Linux version 4.13.0+ (lake@localhost.localdomain) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)) #7 SMP Thu Oct 25 23:11:38 EDT 2018
lake@localhost:~/java/servlet/MyServlet$ uname -a
Linux localhost.localdomain 4.13.0+ #7 SMP Thu Oct 25 23:11:38 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
lake@localhost:~/java/servlet/MyServlet$ sudo rpm -qa |grep tomcat
tomcat-lib-7.0.54-2.el7_1.noarch
tomcat-webapps-7.0.54-2.el7_1.noarch
tomcat-el-2.2-api-7.0.54-2.el7_1.noarch
tomcat-admin-webapps-7.0.54-2.el7_1.noarch
tomcat-7.0.54-2.el7_1.noarch
tomcatjss-7.1.2-1.el7.noarch
tomcat-servlet-3.0-api-7.0.54-2.el7_1.noarch
tomcat-jsp-2.2-api-7.0.54-2.el7_1.noarch
lake@localhost:~/java/servlet/MyServlet$
3. Path
Configuration file path
lake@localhost:$ rpm -ql tomcat-7.0.54-2.el7_1.noarch
.......................
/etc/tomcat/server.xml --------------> HTTP server port (8080/default), <Host> setting
/etc/tomcat/tomcat-users.xml ---------------> Management web username/password
/etc/tomcat/tomcat.conf ---------------> Language/JRE/JVM set etc
/etc/tomcat/web.xml -----------------><web-app <servlet> configuration/default servlet
webapps path
lake@localhost:$ rpm -ql tomcat-webapps-7.0.54-2.el7_1.noarch
/var/lib/tomcat/webapps/ROOT ------------------> Default web pages for http://localhost:8080/
...........
/var/lib/tomcat/webapps/examples/
...............
/var/lib/tomcat/webapps/sample
/var/lib/tomcat/webapps/sample/META-INF
/var/lib/tomcat/webapps/sample/META-INF/MANIFEST.MF
/var/lib/tomcat/webapps/sample/WEB-INF
/var/lib/tomcat/webapps/sample/WEB-INF/classes
/var/lib/tomcat/webapps/sample/WEB-INF/classes/mypackage
/var/lib/tomcat/webapps/sample/WEB-INF/classes/mypackage/Hello.class
/var/lib/tomcat/webapps/sample/WEB-INF/web.xml -----------------> Configuration of servlet (i.e. sample)
/var/lib/tomcat/webapps/sample/hello.jsp
............
Log PATH
/var/log/tomcat