Tag Archives: Relative path versus absolute path

Relative path and absolute path${ pageContext.request.contextPath }

Exe
relative path: the path from the current path, if the current path is C:\ Windows
to describe the path, just type
system32\ CMD. Exe
in fact, the strict relative path should be
.\system32\ CMD. Exe
, where. Represents the current path, which can be omitted in channel cases, but not in special cases.
if the current path is c:\program files
to invoke the above command, you need to type
.. \ Windows \system32\cmd.exe
where.. Is the parent directory.
if the current path is c:\program files\common files
then you need to enter
… .\windows\system32\cmd.exe
Hold on, this should make a lot more sense than it does in the program.
The ${pageContext. Request. ContextPath} is equivalent to the & lt; %=request.getContextPath()%> or you could say < %=request.getContextPath()%> EL version of
means to remove the deployment of the application name, or the current project name
such as my project name for SpringMVC in the browser input for http://localhost:8080/SpringMVC/login.jsp
The ${pageContext. Request. ContextPath} or & lt; %=request.getContextPath()%> is to take out/for SpringMVC, and "/" represents the meaning of is http://localhost:8080
so we project should write ${pageContext. Request. ContextPath}/login JSP
Just give me some examples. I'm going to start with the relative path, and in a lot of cases I'm going to get it right.

You see the delete, I also use the relative path, why it won't go wrong for me, because the request path only one layer, there is no placeholder, when converting HiddenHttpMethodFilter delete request will remove a layer, so will not go wrong, the request path into http://localhost:8080/emp/1001

but this edit is not so optimistic.

There is a placeholder in the path, so the conversion will not be complete.

This is the kind of farce that occurs when multiple layers of requests have no path for a Handler to process in the first place.
So use relative paths as often as possible.