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