如何在Java Web应用程序中设置文件夹的相对路径?

时间:2019-05-31 04:26:01

标签: java

我为文件夹设置了绝对路径,该文件夹包含servlet类和Java Web应用程序中其他类的文件集,这些类在本地主机中正常工作。但是,当尝试将该绝对路径转换为相对路径时,它不起作用。任何人都可以帮助我解决此问题,以便将该Web应用程序上传到服务器。

我的应用程序中的绝对路径是:

C:\\Users\\Alahram\\Desktop\\latest RC2\\latest RC2\\RC2\\src\\docs

并通过相对路径将其折合为:

"/src/java/docs"

类型异常报告

说明服务器遇到意外状况,阻止其满足请求。

Hello! This is the default welcome page for a Spring Web MVC project.

To display a different welcome page for this project, modify index.jsp , or 
create your own welcome page then change the redirection in redirect.jsp to 
point to the new welcome page and also update the welcome-file setting in 
web.xml.  

0 个答案:

没有答案
相关问题