使用Apache Common File上传获取上传的文件绝对位置



我需要上传文件的绝对路径。我尝试使用Enctype,它仅通过request.getParameter.tried JavaScript返回文件名也返回怪异的路径。我知道这是出于安全原因。有什么办法可以获取文件位置?。

Html code is 
<form action="test.jsp" method="post" enctype="multipart/form-data">
  <label for="file">Filename:</label>
  <input type="file" name="file" id="file" ><br>
  <input type="submit" name="submit" value="Submit">
</form>

完成了一些补丁程序。

最新更新