title: Getting absolute path jsf
body: <p>I want to get the absolute path of my app and I'm using the code below:</p>
  
  <pre><code>String pathToSave = FacesContext.getCurrentInstance()
                  .getExternalContext().getRealPath("/");
  </code></pre>
  
  <p>the result is:</p>
  
  <pre><code>/home/ronaldo/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Odontonew/
  </code></pre>
  
  <p>But I'm waiting for something like: <code>/home/ronaldo/workspace/Odontonew/</code></p>
  
  <p>What is wrong ?</p>