I have seen sever开发者_如何学Cal examples using
<a href="<spring:url value='/about/' />" >About </a>
I try this and get an error from 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.
Is there some encoding setting I have overlooked?
This is unfortunate because the other examples of using spring url I have seen are ugly
<spring:url value='/about' var="about_url" />
<a href="${about_url}" title="About MyFit">About MyFit</a>
Do I really need an additional line for every hyperlink in my templates?
Is this something that is fairly trivial and I have overlooked?
You have a .jspx
file, which must be a well-formed XML document. In .jsp
files it would work fine.
精彩评论