Merge remote-tracking branch 'origin/jetty-9.4.x' into issue-1640
This commit is contained in:
commit
7a1d076e64
|
@ -35,6 +35,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import javax.servlet.AsyncContext;
|
import javax.servlet.AsyncContext;
|
||||||
import javax.servlet.RequestDispatcher;
|
import javax.servlet.RequestDispatcher;
|
||||||
|
import javax.servlet.ServletContext;
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
@ -402,7 +403,9 @@ public class ResourceService
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
LOG.debug("welcome={}",welcome);
|
LOG.debug("welcome={}",welcome);
|
||||||
|
|
||||||
if (_redirectWelcome)
|
ServletContext context = request.getServletContext();
|
||||||
|
|
||||||
|
if (_redirectWelcome || context==null)
|
||||||
{
|
{
|
||||||
// Redirect to the index
|
// Redirect to the index
|
||||||
response.setContentLength(0);
|
response.setContentLength(0);
|
||||||
|
@ -416,7 +419,7 @@ public class ResourceService
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RequestDispatcher dispatcher=request.getServletContext().getRequestDispatcher(welcome);
|
RequestDispatcher dispatcher=context.getRequestDispatcher(welcome);
|
||||||
if (dispatcher!=null)
|
if (dispatcher!=null)
|
||||||
{
|
{
|
||||||
// Forward to the index
|
// Forward to the index
|
||||||
|
|
Loading…
Reference in New Issue