How can I check if a file exists in a war file? I know I can use
boolean doesExist = new File(myfile).exists();
but how do I use that in a java class in the war? The file.getAbsolutePath() just shows where the war file is running. I need to check if there is an image in another directory in the war that matchs the filename in the war so I can display that or a generic image if it doesn't exist.