title: How to avoid hard linking Frontend assets In Spring MVC
body: <p>I am new to spring MVC coming with experience using PHP MVC frameworks and ROR. I am having a hard time finding the appropriate way to organize and include front end assets into the view templates.</p>
  
  <p>Here is the default code Roo produces for the default style sheet:</p>
  
  <pre><code>&lt;spring:theme code="styleSheet" var="roo_css"/&gt; 
  &lt;spring:url value="/${roo_css}" var="roo_css_url"/&gt;  
  &lt;spring:url value="/static/images/favicon.ico" var="favicon" /&gt;
  &lt;link rel="stylesheet" type="text/css" media="screen" href="${roo_css_url}"&gt;&lt;/link&gt;
  </code></pre>
  
  <p>This seems totally unnecessary to me. We are calling a variable from the spring:theme code list. Assigning it to a variable in the view scope/ and then calling that view variable for the 
  
  <p>Ideally I would like to have some path tokens like: ${imagePage},  ${stylePath}, etc. That we could drop in and use for soft linking.</p>
  
  <p>Hopefully somebody can point me to some quality SpringMVC documentation or give some examples. Thanks</p>
  
  <p>Update:</p>
  
  <p>I have seen a few examples and engfer has posted one below that suggest using the spring tags within the html to ouput the href like so</p>
  
  <pre><code>&lt;a href="&lt;spring:url url='/about'/ /&gt;"&gt;About&lt;/a&gt;
  </code></pre>
  
  <p>This would be acceptable however I am getting the following error from jetty</p>
  
  <pre><code>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 '&lt;' character.
  </code></pre>
  
  <p>Am I missing something with the encoding? or DTD?</p>
  
  <p>Update:</p>
  
  <p>So apparently the in-line href style only works with .jsp files as .jspx (What im using) is strict xml. What are the benefits of .jspx over .jsp and </p>