我想<spring:url>
在<jsp:include>
标签中使用用 spring 生成的 URL,但它会两次附加上下文路径。我正在使用 Spring MVC 3.1。
<spring:url var="publicationUrl" value="/publications/{id}">
<spring:param name="id" value="${publication.id}" />
</spring:url>
<!-- publicationUrl = "/myApp/publications/1234" -->
<!-- Both methods fail because they are appending the -->
<!-- context again: "/myApp/myApp/publications/1234" -->
<jsp:include page="${publicationUrl}" />
<c:import url="${publicationUrl}" />