我见过几个例子使用
<a href="<spring:url value='/about/' />" >About </a>
我试试这个并从 Jetty 得到一个错误
Caused by: org.apache.jasper.JasperException: /WEB-INF/views/footer.jspx(6,22) The value of attribute "href" associated with an element type "null" must not contain the '<' character.
是否有一些我忽略的编码设置?
这很不幸,因为我见过的其他使用 spring url 的例子很丑
<spring:url value='/about' var="about_url" />
<a href="${about_url}" title="About MyFit">About MyFit</a>
我真的需要为模板中的每个超链接添加一行吗?
这是相当微不足道而我忽略的事情吗?