Path issues for Java redirection and forwarding

Source: Internet
Author: User

Path problem: ① relative path and absolute path: Absolute Path:The absolute path is the path with/begins! Absolute path relative to the current server: if the server resolves, then/represents the absolute path of the current server: http://localhost:8080 relative to the absolute path of the current Web application: Represents the HTTP://LOCALHOST:8080/project name/If it is server-side resolution, generation The table is: http://localhost:8080/project name/If it is browser-side resolution, the representative is: http://localhost:8080 relative path:The path that does not begin with/begins with a relative path, relative to the path of the current Web resource directory!                          ,         &NB Sp                          ,         &NB Sp                             ② common paths:            url-pattern:            forwarding:                > These two absolute paths are parsed by the server, relative to the project's root directory               and nbsp     Host Address: Port number/project name/             REDIRECT Path:       &NBSP ;     In the actual development, we use absolute path, do not use relative path! Try not to use hard-coded way in development!             page path:                > These two paths have browser parsing, root directory relative to the server           &NBsp        /HTTP host Address: Port number/path problem:       ① relative path and absolute path:           Absolute Path: Absolute path is the path with/begins!             The absolute path to the current server: If it is a server resolution, then/represents the absolute path of the current server:http://localhost:8080    & nbsp       Absolute path relative to the current web app: http://localhost:8080/project name/              If this is a server-side resolution, the representative is: http://localhost:8080/project name/            If it is browser-side resolution, it represents:/HTTP localhost:8080            relative path: The path that does not start with/begins with a relative path, relative to the path of the current Web resource directory!         ② common paths:            url-pattern:            path to forward:> The absolute path of both is resolved by the server, relative to the project's root directory/http: port number/project name/ REDIRECT path: in the actual development, we use absolute path, do not use relative path! Try not to use hard-coded way in development! Path in page: > These two paths have browser resolution, relative to the root of the server/HTTP/host Address: Port number/

Path issues for Java redirection and forwarding

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.