我想在 Spring JSP 中打印一个绝对 URL 列表,供内部用户选择。但是,该页面会以当前 URL 为前缀呈现。
例如,我想链接到www.anothersite.com,但链接在页面上显示为http://localhost:8080/myapp/www.anothersite.com
我究竟做错了什么?下面的两行具有相同的结果。
<c:forEach items="${listAppURLForm}" var="nextURL">
<li>
<a href=<c:out value="${nextURL.link}"></c:out>>${nextURL.link}</a>
<a href=${nextURL.link}>${nextURL.link}</a>
</li>
</c:forEach>