title: Eclipse, problems with getRealPath()
body: <p>I am indexing PDF document using Lucene, I use Eclipse indigo as an IDE and tomcat7 as a servlet container , the problem is when I index the document and want to save the original document for later downloading, but eclipse put the documents in temporary directory in stead of the directory I have chosen.<br>
  here is what I am doing.</p>
  
  <p>I have this param in my web.xml</p>
  
  <pre><code>    &lt;context-param&gt;
      &lt;description&gt;Location to store uploaded file also the location of files to be indexed&lt;/description&gt;
      &lt;param-name&gt;file-upload&lt;/param-name&gt;
      &lt;param-value&gt;
      folder\
   &lt;/param-value&gt;
  &lt;/context-param&gt;
  </code></pre>
  
  <p>then calling it inside servlet init() methode like this</p>
  
  <pre><code>filePath = getServletContext().getRealPath("") + File.separator + getServletContext().getInitParameter("file-upload");
  </code></pre>
  
  <p>in short I am trying to store the document in directory called "folder" inside my project which is called "Search", but eclipse will store it in the temporary place like this:</p>
  
  <pre><code>C:\Users\Solid\Dropbox\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Search\folder\ir_overview.pdf
  </code></pre>
  
  <p>but the actual path is like this :</p>
  
  <pre><code>C:\Users\Solid\Dropbox\workspace\Search\WebContent\folder
  </code></pre>
  
  <p>any idea how to solve this??</p>