![](/img/trans.png)
[英]Tomcat cannot find servlets and JSP files when deployed on a different machine
[英]Web application cannot find files when deployed
我有一个使用files.txt的应用程序。 当我使用主类测试应用程序时,它可以工作,但是在部署它时,我会遇到此错误:
java.io.FileNotFoundException: keyWords/CA.txt (No such file or directory)
java.io.FileNotFoundException: keyWords/CA.txt (No such file or directory)
java.io.FileNotFoundException: keyWords/NormalWords.txt (No such file or directory)
我该如何进行这项工作。 谢谢 !
我通过提供完整路径解决了该问题:在ide中,右键单击该文件,然后转到“属性”; 获得绝对路径。 将该路径作为输入文件。 这个对我有用。 HTH!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.