Tomcat server configuration (server.xml)

1 Configure the default startup project

Tomcat sets the default startup project, as the name suggests, so that we can access our project by entering ip:8080 in the address bar of the browser. The specific operations are as follows:

    1. Open the installation root directory of tomcat, find Tomcat 6.0\conf\server.xml, open the file, find the <Host> node, and add <Context path="" docBase="../WebTest" debug= "0" reloadable="true"/>.

    2. Put the WebTest project in the tomcat root directory, and delete or rename the ROOT folder in the webapps folder to another name.

   3. Start tomcat, enter ip:8080 in the browser, and you can access your project.

 

 Note: The value of the docBase attribute in the <Context> node is the absolute path to the web project.

 

    

 

                            Web project settings default startup page

The default startup page for Java web project settings is configured through the web.xml file. The specific configuration is as follows:

<servlet>

<servlet-name>StartServlet</servlet-name>

    <servlet-class>NVMP.VideoServer.implement.StartServlet</servlet-class>

     <load-on-startup>0</load-on-startup>

</servlet>

 

  <servlet-mapping>

    <servlet-name>StartServlet</servlet-name>

    <url-pattern>/StartServlet</url-pattern>

  </servlet-mapping>

 

  <welcome-file-list>

    <welcome-file>login.jsp</welcome-file>

  </welcome-file-list>

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327005076&siteId=291194637