When writing a Java Web project, you need to define a lot of JSP files, if all the unified in the root directory of the webcontent looks like a mess, time has long been unable to find the specific JSP file corresponding function is what, Therefore, it is best to customize the folder in the root directory of webcontent to store JSP files of different function modules.
However, when the JSP file is placed in the WebContent root directory, it is OK to refer to the file name directly when the href reference is needed, and it is not easy to make an error, as follows:
<a href= "find.jsp" > Forgot password </a>
However, when we use a custom folder to put a different JSP file can not be directly referenced, otherwise the following error will appear:
The origin server did not find a current representation for the target resource or was not willing to disclose that one Exi Sts.
So when you put the JSP file in a separate folder, you should pay attention to the method of reference:
<a href= "http://localhost:8080/save_use/Regis/regis.jsp" > Registered account </a><br >
Red is the project name, yellow is the folder name that holds the JSP file, Green is the JSP file
How to use HREF to link JSP files in different folders in a Java Web project