Eclipse,getRealPath()问题

sol*_*lid 5 eclipse lucene indexing servlets path

我正在使用Lucene为PDF文档建立索引,我使用Eclipse indigo作为IDE,并且将tomcat7作为servlet容器,问题是当我为文档建立索引并希望保存原始文档以供以后下载时,但是将eclipse放在了临时目录中而不是我选择的目录。
这是我在做什么。

我的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>
Run Code Online (Sandbox Code Playgroud)

然后像这样在servlet init()方法中调用它

filePath = getServletContext().getRealPath("") + File.separator + getServletContext().getInitParameter("file-upload");
Run Code Online (Sandbox Code Playgroud)

简而言之,我正在尝试将文档存储在项目内名为“搜索”的“文件夹”目录中,但是eclipse会将其存储在这样的临时位置:

C:\Users\Solid\Dropbox\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Search\folder\ir_overview.pdf
Run Code Online (Sandbox Code Playgroud)

但是实际路径是这样的:

C:\Users\Solid\Dropbox\workspace\Search\WebContent\folder
Run Code Online (Sandbox Code Playgroud)

任何想法如何解决这个问题?