Javascript html可以';t获取地址正确的照片返回404

Javascript html可以';t获取地址正确的照片返回404,javascript,java,html,web,http-status-code-404,Javascript,Java,Html,Web,Http Status Code 404,所以我在使用spring和tomcat,它们在我的/opt/webapps/images/xxxx.jpeg中存在一张照片,在我的html页面中,我想通过 我们同意的内容已更正,但它始终返回404 那么为什么呢?在web.xml配置中添加: <mvc:resources mapping="/resources/**" location="/opt/webapps/images/**" /> 在jsp页面中: <%@ taglib u

所以我在使用spring和tomcat,它们在我的/opt/webapps/images/xxxx.jpeg中存在一张照片,在我的html页面中,我想通过
我们同意的内容已更正,但它始终返回404


那么为什么呢?

在web.xml配置中添加:

<mvc:resources mapping="/resources/**" location="/opt/webapps/images/**" />

在jsp页面中:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
     <head>
     </head>
     <body>
        <link href="<c:url value="/resources/xxxx.jpeg" />" >
    </body>
</html>

404
说它是不正确的,不管“谁”同意的是正确的。如果在.jsp文件中添加,则文件必须是.jsp