I want to create a serlvet which checks for the existence of a JSP file. I am kind of new to JSP/Servlet, so I don't know if I am doing it correctly. This is the code I have to run this check:

public boolean isURLValid(String area, String section, String page){

File areaFile = new File("/repositorium/jsp/" + area + "/");
File sectionFile = new File("/repositorium/jsp/" + area + "/" + section + ".jsp");
File pageFile = new File("/repositorium/jsp/" + area + "/" + page + ".jsp");

if (areaFile.isDirectory() == true && sectionFile.isFile() == true && pageFile.isFile() == true){
return true;
} else {
return false;

This does not work for me. I am trying to check for the existence of this file using an absolute path, starting from the application's root, called 'repositorium'.

Can someone give me some feedback on this?

Thanks in Advance!