comparison src/org/eclipse/jetty/server/handler/ResourceHandler.java @ 991:688c39c50ee3

simplify ContextHandler
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 18 Oct 2016 00:22:46 -0600
parents f89abbfb3a8f
children 0608a6664bee
comparison
equal deleted inserted replaced
990:83cc6e05a58f 991:688c39c50ee3
36 import org.eclipse.jetty.io.WriterOutputStream; 36 import org.eclipse.jetty.io.WriterOutputStream;
37 import org.eclipse.jetty.server.AbstractHttpConnection; 37 import org.eclipse.jetty.server.AbstractHttpConnection;
38 import javax.servlet.RequestDispatcher; 38 import javax.servlet.RequestDispatcher;
39 import org.eclipse.jetty.server.Request; 39 import org.eclipse.jetty.server.Request;
40 import org.eclipse.jetty.server.Response; 40 import org.eclipse.jetty.server.Response;
41 import org.eclipse.jetty.server.handler.ContextHandler.Context;
42 import org.eclipse.jetty.util.URIUtil; 41 import org.eclipse.jetty.util.URIUtil;
43 import org.slf4j.Logger; 42 import org.slf4j.Logger;
44 import org.slf4j.LoggerFactory; 43 import org.slf4j.LoggerFactory;
45 import org.eclipse.jetty.util.resource.FileResource; 44 import org.eclipse.jetty.util.resource.FileResource;
46 import org.eclipse.jetty.util.resource.Resource; 45 import org.eclipse.jetty.util.resource.Resource;
131 /* ------------------------------------------------------------ */ 130 /* ------------------------------------------------------------ */
132 @Override 131 @Override
133 public void doStart() 132 public void doStart()
134 throws Exception 133 throws Exception
135 { 134 {
136 Context scontext = ContextHandler.getCurrentContext(); 135 _context = ContextHandler.getCurrentContext();
137 _context = (scontext==null?null:scontext.getContextHandler());
138
139 if (_context!=null)
140 _aliases=_context.isAliases();
141 136
142 if (!_aliases && !FileResource.getCheckAliases()) 137 if (!_aliases && !FileResource.getCheckAliases())
143 throw new IllegalStateException("Alias checking disabled"); 138 throw new IllegalStateException("Alias checking disabled");
144 139
145 super.doStart(); 140 super.doStart();