How web projects are deployed

* How to deploy WEB programs (three types)
             1 * Copy the project to the webapps directory.
                    
              2 * By configuring the virtual path.
                    * Directly modify the configuration file
                        * Write to tomcat/conf/server.xml
                        * Find the <Host> tag and configure it in the middle of the Host tag
                        * Purpose: Through configuration, configure the access path, and accurately find the file in c:\bb
                            * <Context docBase ="The real directory of the folder" path="Virtual path (access path)" ><Context>
                            * <Context docBase="C:\bb" path="/itcast" ></Context>
                            * Access: http:/ /localhost:80/itcast
                            
               3 * Write a configuration file (format) by yourself (recommended)
                        * Customize the xxx.xml ending file in $CATALINA_HOME/conf/[enginename]/[hostname]/ directory. Under contents.
                        * Treat xxx as a virtual (access) path.
                        
                        * Write in the xml file.
                            * In which directory:
                                * $CATALINA_HOME/conf/[enginename]/[hostname]/ directory.
                                * If you want to find the name of the engine and the name of the host, you can find it in server.xml.
                                * tomcat/conf/Catalina/localhost/ccc.xml
                                
                            * What is written in the ccc.xml file?
                                * <Context docBase="C:\cc"></Context>
                            * Access: http://localhost:80/ccc

Guess you like

Origin blog.csdn.net/sinat_35541927/article/details/81146245