Simplifies the access path of the browser address bar and simplifies the browser address bar

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.