当前位置:网站首页>Why can't the picture be loaded when jumping to 500 pages in JSP

Why can't the picture be loaded when jumping to 500 pages in JSP

2021-12-04 00:02:05 No woman knocks the code in the heart, natural God!!

One : Problem description

We're customizing 500 Error page , Pictures can be loaded on the current error page , But jump on other pages 500 Error page , Can't get the picture of the error page

Two : Problem solving ( The picture can't be loaded , It's probably a path problem )

Click the path of the picture ,

<body>
<img src="${pageContext.request.contextPath}/image/500.png" alt="#">
<h1> 500</h1>
</body>

<%–${pageContext.request.contextPath} yes JSP The way to get the absolute path , Equivalent to <%=request.getContextPath()%> .–%>

版权声明
本文为[No woman knocks the code in the heart, natural God!!]所创,转载请带上原文链接,感谢
https://chowdera.com/2021/11/20211116181110382L.html

随机推荐