I implemented a java web application using html page and servlet classes. In servlet class, I need to read a list of files one by one from a specific directory in the project as follows:
File folder = new File("C:\\Users\\Alahram\\Desktop\\latest RC2\\latest
RC2\\RC2\\src\\docs\\");
File[] files = folder.listFiles();
It works correctly from an absolute path on localhost, but I need to use relative path for this directory to be able upload this project to the server. Can anyone help me in this problem?