I have a JAVA EE app. with this structure:
/iberiaApp
/iberiaApp/configFiles/hotel
/iberiaApp/config.jsp
/iberiaApp/WEB-INF/classes
inside config.jsp
I have this piece of code:
<%=FileReader.readFiles("configFiles/hotel")%>;
and
public static List<String> readFiles (String folder) throws URISyntaxException {
ClassLoader classLoader = FileReader.class.getClassLoader();
URI uri = classLoader.getResource(folder).toURI();
But I got a nullpointer getting the URI (classLoader.getResource(folder) is returning null)