我在 Tomcat 中部署了我的 restlet.Component,在此,我读取了我的应用程序的配置文件:
this.properties.load(new FileInputStream("config/conf.properties));
我有一个java.io.FileNotFoundException
我的 webapp 结构是:
/mi-webapp
/config
conf.properties
/WEB-INF
/classes
/lib
web.xml
我怎样才能得到restlet的真实路径?我读过,ServletContext.getRealPath()
但这是一个不好的做法,你怎么推荐?