Absolute path: The path that starts with/begins with the absolute path, and the absolute path is directly spliced on the relative path to get the final path.
Relative path: A path that does not start with/begins with a relative path, and the relative path is calculated from the path to the final path based on the current route.
Hard drive Path: The path that begins with a drive letter is called the hard drive path. Which path is which is the path. There is no question relative to WHO
Virtual path:--use absolute path when writing virtual path
If the path is for the browser, the path is relative to the virtual host, so you need to write the name of the Web App
If the path is a server, this path is relative to the Web app, so you can save the name of the Web App
<a href= "/day04/..." >
<form action= "/day04/..." >
Response.setheader ("Location", "/day04/....");
Response.setheader ("Refresh", "3;url=/day04/...");
Response.sendredirect ("/day04/...");
Request.getrequestdispathce ("/index.jsp"). Forward ();
Request.getrequestdispathce ("/index.jsp"). include ();
True path:--use relative paths when writing real paths
According to the principle, concrete analysis of specific problems
Servletcontext.getrealpath ("Config.properties");//--to a path relative to the Web application directory
Classloader.getresource (".. /.. /config.properties ");//--to a path that loads the directory relative to the class
File File = new file ("Config.properties");//--startup directory relative to the program
New InputStream ("Config.properties");//--startup directory relative to the program
Java Web Path analysis