mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-03 20:39:18 +00:00
405526 Deployment must fail if more than 1 servlet maps to same url pattern
This commit is contained in:
parent
bd153af2e2
commit
215d2e2095
@ -1278,7 +1278,11 @@ public class ServletHandler extends ScopedHandler
|
||||
String[] pathSpecs = servletmapping.getPathSpecs();
|
||||
for (String pathSpec : pathSpecs)
|
||||
if (pathSpec != null)
|
||||
pm.put(pathSpec, servlet_holder);
|
||||
{
|
||||
ServletHolder previous = pm.put(pathSpec, servlet_holder);
|
||||
if (previous != null)
|
||||
throw new IllegalStateException("Multiple servlets map to path: "+pathSpec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user