我有一个struts项目,我从war文件中导入了eclipse。 通过在tomcat中部署它可以完美地工作。但导入后相同的情况显示错误:
log4j:ERROR Could not read configuration file from URL [file:/D:/xxxfolder/xxxworkspace/xxxproject/WebContent/WEB-INF/classes/log4j.properties].
java.io.FileNotFoundException: D:xxx\xxx\xxx\WebContent\WEB-INF\classes\log4j.properties (The system cannot find the path specified)
我在src文件夹中有log4j.property。
请帮助解决它的正确解决方案!
如果需要更多信息,请告诉我
EDIT! 我找到了问题的根源,但无法找到解决方案 默认情况下,eclipse中src的输出构建路径是:build / classess。但是tomcat正在webContent / web_inf / Classess上搜索文件/你能建议怎么做。如何将log4j的输出文件更改为特定的tomcat正在搜索。
答案 0 :(得分:1)
在上面的评论中,结论是,路径不正确。修改路径后,问题就解决了。