0
我只需要使用war文件名作为输入来获取war文件的完整文件路径。我的意思是,返回值应该像C:/PFiles/project/tomcat/sender/sender.war如何获取Web应用程序的war文件的路径?
我试图使用下面的路径,但它没有给我正确的路径。
File file = new File("sender.war");
String path = file.getAbsolutePath();
如何找到正确的路径?
可能的重复:http://stackoverflow.com/questions/9727507/how-do-i-get-the-name-of-the-war-file –