I'm writing a tiny web server in
java and Im using netbeans. I got a couple of external files and the function of the server is to display the files when I request them in the browser but I got a weird problem with the files. I've placed the files in the source package that contains the program and when I do that the function that checks if a file exists after you request it in the browser are able to find the file. But when the program send this filename into the function that sends the file to the browser the java program can't locate it. The strange part is that it works though if I place the file directly in the main folder but if I do that the part that checks if a file exist can't find it. Any idea how to solve this?