How to deploy web project to tomcat
The first deployment method:
Just copy the web project directory to Tomcat's webapps directory
That's it.
-
Create a project in the webapps directory;
-
Copy the project that needs to be deployed to the project created under Tomcat's webapps directory;
How to access the web project under Tomcat:
Enter the access address format in the browser as follows:
http://ip:port/project name/directory/file name
E.g:
http://192.168.17.29:8080/book/pages/user/regist.html
The second deployment method:
- Find the conf directory \Catalina\localhost\ under Tomcat and create the abc.xml configuration file;
- The content of the abc.xml configuration file is as follows:
<!--Context 表示一个工程上下文 path 表示工程的访问路径:/abc docBase 表示你的工程目录在哪里 --> <Contextpath="/abc"docBase="E:\book"/>
The path to access this project is as follows:
http://ip:port/abc/ means access to the E:\book directory