The JSP in the web-inf directory cannot refer to the solution of external css

When looking at most methods

<c:set value="${pageContext.request.contextPath}" var="path" scope="page"/>

<link type="text/css" href="${path}/css/xxx.css" rel="stylesheet">

//It looks like this will return to the level of web-root (WebContent), and then down

But I don’t know why this method can’t be referenced, and then I found another method, and finally it was introduced.

First look at my directory structure

Citation method 

     <link rel="stylesheet" href="<%=request.getContextPath() %>/css/changePass_css.css" type="text/css"></link>
 

Guess you like

Origin blog.csdn.net/qhlpptdyfn/article/details/81093731