如何在Websphere中读取文件属性

时间:2012-02-29 09:32:39

标签: java-ee properties io struts websphere

我正在将EAR文件部署到IBM WebSpehre服务器6.1 并且属性文件位于共享库中。

当我启动服务器时,在System.err中我收到了此错误

[29/02/12 10.13.10:487 CET] 00002e0f ActionServlet E org.apache.struts.action.ActionServlet init Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown, so marking the servlet as unavailable.  Most likely, this is due to an incorrect or missing library dependency.
javax.servlet.ServletException: Null InputStream is not a valid argument
    at it.blabla.StartUpInit.init(StartUpInit.java)
    at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:871)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:359)

在说明中

this.getClass().getClassLoader().getResourceAsStream("path as String").

我必须在getResourceAsStream中添加什么路径?现在值为“/xml/file.properties”

0 个答案:

没有答案