diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java index 4e50541939e..bc4a3de8802 100644 --- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java +++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppContext.java @@ -327,6 +327,9 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL @Override public Resource getResource(String uriInContext) throws MalformedURLException { + if (uriInContext==null || !uriInContext.startsWith(URIUtil.SLASH)) + throw new MalformedURLException(uriInContext); + IOException ioe= null; Resource resource= null; int loop=0;