Skip welcomeServlet logic if requestTarget
does not resolve.
This commit is contained in:
parent
1b790d51b4
commit
6ab8aa8d30
|
@ -963,8 +963,10 @@ public class DefaultServlet extends HttpServlet
|
|||
|
||||
String requestTarget = isPathInfoOnly() ? request.getPathInfo() : coreRequest.getPathInContext();
|
||||
|
||||
Resource base = _baseResource.resolve(requestTarget);
|
||||
String welcomeServlet = null;
|
||||
Resource base = _baseResource.resolve(requestTarget);
|
||||
if (base != null && base.exists())
|
||||
{
|
||||
for (String welcome : welcomes)
|
||||
{
|
||||
Resource welcomePath = base.resolve(welcome);
|
||||
|
@ -981,6 +983,7 @@ public class DefaultServlet extends HttpServlet
|
|||
welcomeServlet = welcomeInContext;
|
||||
}
|
||||
}
|
||||
}
|
||||
return welcomeServlet;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue