title: Cannot get the real path of a file in the project folder
body: <p>Within a jsp file i'm trying to navigate to load xml file. The location of the JSP file is</p>
  
  <pre><code>/projectFolder/layout/applicationName/index.jsp
  </code></pre>
  
  <p>the location of the xml file</p>
  
  <pre><code>/projectFolder/data/files/myfile.xml
  </code></pre>
  
  <p>The location of the project folder is different in each environment, example: in my local pc the location is:</p>
  
  <pre><code>c:\myApps\BPServer\tomcat\webapps\projectFolder
  </code></pre>
  
  <p>when i use the following code:</p>
  
  <pre><code>&lt;c:set var="xmlfile" value="${pageContext.request.contextPath}/data/files/myfile.xml"/&gt;
  </code></pre>
  
  <p>The value of xmlFile is set to:</p>
  
  <pre><code>c:\projectFolder\data\files\myfile.xml 
  </code></pre>
  
  <p>However the strange thing is that if i use the xmlfile as <code>href</code> then the correct path and file is located:</p>
  
  <pre><code>&lt;jsp:attribute name="rightContent"&gt;&lt;a href="${xmlfile}"&gt;XML FILE&lt;/a&gt;&lt;/jsp:attribute&gt;
  </code></pre>
  
  <p>Any idea how can i get the correct file path in order to the following to work:</p>
  
  <pre><code>boolean canLocateFile = fileExists(xmlfile);
  
      public static boolean fileExists(String filepath)
          {
              File f = new File(filepath);
              return f.exists();
          }
  </code></pre>