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.
here is what I am doing.
I have this param in my web.xml
<context-param>
<description>Location to store uploaded file also the location of files to be indexed</description>
<param-name>file-upload</param-name>
<param-value>
folder\
</param-value>
</context-param>
then calling it inside servlet init() methode like this
filePath = getServletContext().getRealPath("") + File.separator + getServletContext().getInitParameter("file-upload");
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:
C:\Users\Solid\Dropbox\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Search\folder\ir_overview.pdf
but the actual path is like this :
C:\Users\Solid\Dropbox\workspace\Search\WebContent\folder
any idea how to solve this??