I am currently working on a web project and I now tried to get the path of my a html file which lies in a different folder (WebContent folder) than the servlet I want to call from. It only works when I manually input the whole path by hand, but I can't get the path via any method. I have tried using
request.getURI
request.getAbsolutePath
request.getContentPath
Paths.getPath
etc.
I am new to working with Servlets and really don't get why I can't seem to get the full local path. Hope someone can help or show me to a thread which solved this. Thanks in advance!