Simplifies the access path of the browser address bar and simplifies the browser address bar
Generally, this configuration is performed in the web. xml file of your project.
<welcome-file-list> <welcome-file>/index.jsp</welcome-file></welcome-file-list>
Enter http: // localhost: 8080/your project name in the address bar of the browser.
Is the index. jsp file under the WebRoot directory of the Project accessed by default.
I want to enter http: // localhost: 8080/to access index. jsp.
In addition to the web. xml file, you must configure the preceding settings.
Configure the following in the server. xml file under the apache-tomcat-7.0.53 \ conf directory:
Configure before the </Host> node
<Context path="" docBase="E:\apache-tomcat-7.0.53\webapps\xxxx" debug="0" reloadable="true" crossContext="true" />
E: \ apache-tomcat-7.0.53 \ webapps \ xxxx is the xxxx Project under the webapps directory of the tomcat server.
(You can write the path E: \ apache-tomcat-7.0.53 \ webapps \ xxxx at will, because it is developed by myeclipse and directly published to the tomcat server, in this way, you do not need to copy the project to your specified directory)
If you use myeclipse for development, publishing to the tomcat server is under the webapps directory.
Now, after you map your xxxx Project
Http: // localhost: 8080 /.
Note: In the webapps directory of the tomcat server, in addition to your xxxx Project, there are also the docs, examples, host-manager, manager, and ROOT directories.
Try not to leave other directories
And under the directory of apache-tomcat-7.0.53 \ work \ Catalina \ localhost
In addition to your xxxx directory, there are also directories such as-, docs, examples, host-manager, and manager.
Try not to leave other directories
This improves the server startup speed.
Enter the web path to be accessed in the address bar of the browser. If the path is not found, an error page is returned.
Same configuration through web. xml
<Error-page>
<Error-code> 404 </error-code>
<Location>/page. jsp </location> <! -- Note that the path must be correct -->
</Error-page>
Lan browser access path Problems
\ 192.168.0.2 \ e $
Note: The premise is that the "e" disk on the server must be hidden and shared. If not, it cannot be accessed.