Skip to content

Commit 532f1e8

Browse files
markt-asfstuartwdouglas
authored andcommitted
Fix jakartaee#105 - clarify requirements for path in getRealPath(String path)
Signed-off-by: Mark Thomas <markt@apache.org>
1 parent f9da4fb commit 532f1e8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

api/src/main/java/jakarta/servlet/ServletContext.java

+5
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,11 @@ public interface ServletContext {
427427

428428
/**
429429
* Gets the <i>real</i> path corresponding to the given <i>virtual</i> path.
430+
*
431+
* <p>
432+
* The path should begin with a <tt>/</tt> and is interpreted as relative to the current context root. If the path does
433+
* not begin with a <tt>/</tt>, the container will behave as if the method was called with <tt>/</tt> appended to the
434+
* beginning of the provided path.
430435
*
431436
* <p>
432437
* For example, if <tt>path</tt> is equal to <tt>/index.html</tt>, this method will return the absolute file path on the

0 commit comments

Comments
 (0)