Mercurial Hosting > luan
comparison src/luan/host/WebHandler.java @ 1314:51a1987b55a3
don't use NotFound handler
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 29 Jan 2019 19:10:39 -0700 |
parents | d41997776788 |
children | 5763597ca5c0 |
comparison
equal
deleted
inserted
replaced
1313:15af473045c4 | 1314:51a1987b55a3 |
---|---|
23 import luan.LuanFunction; | 23 import luan.LuanFunction; |
24 import luan.modules.IoLuan; | 24 import luan.modules.IoLuan; |
25 import luan.modules.JavaLuan; | 25 import luan.modules.JavaLuan; |
26 import luan.modules.PackageLuan; | 26 import luan.modules.PackageLuan; |
27 import luan.modules.http.LuanHandler; | 27 import luan.modules.http.LuanHandler; |
28 import luan.modules.http.NotFound; | |
29 | 28 |
30 | 29 |
31 public class WebHandler implements Handler { | 30 public class WebHandler implements Handler { |
32 private static final Logger logger = LoggerFactory.getLogger(WebHandler.class); | 31 private static final Logger logger = LoggerFactory.getLogger(WebHandler.class); |
33 | 32 |
162 LuanState luan = new LuanState(); | 161 LuanState luan = new LuanState(); |
163 LuanTable init = initLuan(luan,dir,domain); | 162 LuanTable init = initLuan(luan,dir,domain); |
164 | 163 |
165 String loggerRoot = (String)init.rawGet("logger_root"); | 164 String loggerRoot = (String)init.rawGet("logger_root"); |
166 LuanHandler luanHandler = new LuanHandler(luan,loggerRoot); | 165 LuanHandler luanHandler = new LuanHandler(luan,loggerRoot); |
167 NotFound notFoundHandler = new NotFound(luanHandler); | |
168 | 166 |
169 Handler handler = luanHandler; | 167 Handler handler = luanHandler; |
170 handler = new IndexHandler(handler); | 168 handler = new IndexHandler(handler); |
171 handler = new ListHandler( handler, notFoundHandler ); | |
172 | 169 |
173 String logDir = dir + "/site/private/local/logs/web"; | 170 String logDir = dir + "/site/private/local/logs/web"; |
174 new File(logDir).mkdirs(); | 171 new File(logDir).mkdirs(); |
175 | 172 |
176 return new LuanRef(handler,luanHandler); | 173 return new LuanRef(handler,luanHandler); |