title: pageContext.request.contextPath and generic linking
body: <p>In reference to my older unanswered question, I have a further error / problem that is partially related to it. </p>
  
  <p><a href="https://stackoverflow.com/questions/18028466/generic-linking-variables-and-paths-in-jsp">generic linking, variables and paths in jsp</a></p>
  
  <p><img src="https://i.stack.imgur.com/NALet.png" alt="enter image description here"></p>
  
  <p>When I include my header.jsp like this:</p>
  
  <pre><code>&lt;%@include file="/WEB-INF/view/jsp/common/header.jsp" %&gt;
  </code></pre>
  
  <p>It works fine.</p>
  
  <p>But does not if I do it like this:</p>
  
  <pre><code>&lt;%@include file="${pageContext.request.contextPath}/view/jsp/common/header.jsp" %&gt;
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>HTTP Status 500 - /WEB-INF/view/jsp/common/login/login.jsp (line: 8, column: 1) File "${pageContext.request.contextPath}/view/jsp/common/header.jsp" not found
  </code></pre>
  
  <p>The above with ${} is a proper way and thats what I had been doing in the past until I started using spring and spring security.</p>
  
  <p>But I dont think its a problem of spring or spring security.</p>
  
  <p>I really cant understand why <code>WEB-INF</code> has a weightage and 
  How can I make my links generic (ref my old stated question)</p>