Tomcat configuration (1)

xiaoxiao2021-03-06  67

Add a virtual directory to increase in server.xml files

myWeb means its relative WebApps, is a physical existence directory; / OICQ means its relative Web URL Path, is a virtual path, such as http: // localhost / oicq

Configure the JSP and ServletJSP files directly under MyWeb; compiled JavaBean, servlet places the class content under Web-INF, and the path of the package is consistent with the directory path.

Configure the server's port on the 56th line of the server.xml file, modify port = "8080" for the port number you want to use, such as: 80

Web.xml file settings Default (welcome) file settings in h: /tomcat4/conf/web.xml, is the same as the default files in IIS. index.html index.htm index.jsp < / Welcome-file-list>

Infault file setting 404 /notfilefound.jsp java. Lang.NullPointerException /null.jsp If a file resource is not found, the server wants to report 404 errors, and the H: / Tomcat / WebApps / root / notfilefilefound.jsp. If a JSP file executed is generated, h: /tomcat4/webapps/root/null.jsps/root/null.jsp

转载请注明原文地址:https://www.9cbs.com/read-120179.html

New Post(0)