You already provided the link to the javadoc, quoting the relevant part:
The path must begin with a / and is interpreted as relative to the current context root, or relative to the /META-INF/resources directory of a JAR file inside the web application's /WEB-INF/lib directory.
So it is interpreted as relative to the /META-INF/resources folder in a jar file.
However you indicated with a tag that you are using Tomcat. Tomcat implementation of the ServletContext.getResource() is somewhat different. It doesn't even mention the resource is searched in jar files.
Suggestion: don't put your resources in jar files if you want to access them with ServletContext.getResource(). If you do need to put them into jar files, then instead use the Class.getResource() method, e.g. put an optionally empty class into the jar file, and use that to access/load the resource, for example:
Jar content:
/ |- SomeClass.class |- test.jsp
Java code to access test.jsp:
SomeClass.class.getResource("/test.jsp"); // or it can even be "test.jsp"