Path problem:
① relative path and absolute path:
Absolute path: 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
Absolute path relative to the current web app: Represents the HTTP://LOCALHOST:8080/project name/
If this is a server-side resolution, the representative is: http://localhost:8080/Project name/
If it is a 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!
Common paths for ②:
Url-pattern:
Path to forward:
> These two absolute paths are resolved by the server, relative to the project's root directory
/HTTP Host Address: 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 the page:
> These two paths have browser parsing, relative to the root of the server
/HTTP Host Address: Port number/
Path problems in Servlets and HTML