JSP Beginner: Page Path choreography

Source: Internet
Author: User
Tags parent directory reference
js| page

To enter the page on the site, through the path or container management to achieve the link between each other! For paths, there are two types:

1. Connection to files under the path of the file:/subdirectory/reference file name.

2. A connection to a file under the same path: direct citation file.

3. For the directory of the path of the file link: Back up a parent directory until you retire to the same parent directory, and then take the path to the referenced file. namely:.. /""/path.

The way to organize the paths in the container is: (a java example)

1. In the case of JSP, the same reference method is used with normal pages.

2. In the case of a servlet, you need to refer back to the Web-inf (because it is usually the virtual path of the container).

In the case of a. js file, the organization of the path is not determined by the location of the JS file, but by the location of the main page such as HTML or JSP using the. js file.



Related Article

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.