这样去找:InputStream fileIn = getClass().getResourceAsStream("/SampleServlet.properties");
解决方案 »
- 遍历emp表,通过enamel打印出empno,系统提示错误,求帮助
- The server encountered an internal error ()
- 哪位高人推荐本书 跪求啦!!!
- struts2 下载错误!
- 问个JSP连接池的问题
- opencms5.0.1安装完毕后我editpage的时候就报错,各位高手帮我看看为啥会有这个问题
- 求助:删除table最后一行表单提交错误
- 权限的实现问题?
- 有关项目收费问题,懂行的请进。(将原来html页,改为jsp)
- 怎么我就不行呢?关于tomcat配置自己的虚拟目录的问题!!!
- 我的序列号为什么一次运行会滚动多个?
- ';' expected ???
把properties 文件放在tomcat哪个目录可以吗?
URL thisPropertyUrl = SampleServlet.class.getResource("SampleServlet.properties");
String thisPropertyPath = thisServletUrl.getPath();
File file = new File(thisPropertyPath);