/** * Add default apps. * * @param appDir * The application directory * @throws IOException */ protected void addDefaultApps(ContextHandlerCollection parent, final String appDir, Configuration conf) throws IOException { // set up the context for "/logs/" if "hadoop.log.dir" property is defined. String logDir = System.getProperty("tajo.log.dir"); if (logDir != null) { Context logContext = new Context(parent, "/logs"); logContext.setResourceBase(logDir); //logContext.addServlet(AdminAuthorizedServlet.class, "/*"); logContext.setDisplayName("logs"); defaultContexts.put(logContext, true); } // set up the context for "/static/*" Context staticContext = new Context(parent, "/static"); staticContext.setResourceBase(appDir + "/static"); staticContext.addServlet(DefaultServlet.class, "/*"); staticContext.setDisplayName("static"); defaultContexts.put(staticContext, true); }
/** * Add default apps. * * @param appDir * The application directory * @throws IOException */ protected void addDefaultApps(ContextHandlerCollection parent, final String appDir, Configuration conf) throws IOException { // set up the context for "/logs/" if "hadoop.log.dir" property is defined. String logDir = System.getProperty("tajo.log.dir"); if (logDir != null) { Context logContext = new Context(parent, "/logs"); logContext.setResourceBase(logDir); //logContext.addServlet(AdminAuthorizedServlet.class, "/*"); logContext.setDisplayName("logs"); defaultContexts.put(logContext, true); } // set up the context for "/static/*" Context staticContext = new Context(parent, "/static"); staticContext.setResourceBase(appDir + "/static"); staticContext.addServlet(DefaultServlet.class, "/*"); staticContext.setDisplayName("static"); defaultContexts.put(staticContext, true); }
"org.mortbay.jetty.servlet.Default.aliases", "true"); logContext.setDisplayName("logs"); setContextAttributes(logContext); defaultContexts.put(logContext, true); staticContext.setResourceBase(appDir + "/static"); staticContext.addServlet(DefaultServlet.class, "/*"); staticContext.setDisplayName("static"); setContextAttributes(staticContext); defaultContexts.put(staticContext, true);
"org.mortbay.jetty.servlet.Default.aliases", "true"); logContext.setDisplayName("logs"); setContextAttributes(logContext, conf); addNoCacheFilter(webAppContext); staticContext.setResourceBase(appDir + "/static"); staticContext.addServlet(DefaultServlet.class, "/*"); staticContext.setDisplayName("static"); setContextAttributes(staticContext, conf); defaultContexts.put(staticContext, true);
"org.mortbay.jetty.servlet.Default.aliases", "true"); logContext.setDisplayName("logs"); setContextAttributes(logContext, conf); addNoCacheFilter(webAppContext); staticContext.setResourceBase(appDir + "/static"); staticContext.addServlet(DefaultServlet.class, "/*"); staticContext.setDisplayName("static"); setContextAttributes(staticContext, conf); defaultContexts.put(staticContext, true);
"org.mortbay.jetty.servlet.Default.aliases", "true"); logContext.setDisplayName("logs"); setContextAttributes(logContext, conf); addNoCacheFilter(webAppContext); staticContext.setResourceBase(appDir + "/static"); staticContext.addServlet(DefaultServlet.class, "/*"); staticContext.setDisplayName("static"); setContextAttributes(staticContext, conf); defaultContexts.put(staticContext, true);
"org.mortbay.jetty.servlet.Default.aliases", "true"); logContext.setDisplayName("logs"); setContextAttributes(logContext, conf); addNoCacheFilter(webAppContext); staticContext.setResourceBase(appDir + "/static"); staticContext.addServlet(DefaultServlet.class, "/*"); staticContext.setDisplayName("static"); setContextAttributes(staticContext, conf); defaultContexts.put(staticContext, true);
"org.mortbay.jetty.servlet.Default.aliases", "true"); logContext.setDisplayName("logs"); setContextAttributes(logContext, conf); addNoCacheFilter(webAppContext); staticContext.setResourceBase(appDir + "/static"); staticContext.addServlet(DefaultServlet.class, "/*"); staticContext.setDisplayName("static"); setContextAttributes(staticContext, conf); defaultContexts.put(staticContext, true);
"org.mortbay.jetty.servlet.Default.aliases", "true"); logContext.setDisplayName("logs"); setContextAttributes(logContext, conf); addNoCacheFilter(webAppContext); staticContext.setResourceBase(appDir + "/static"); staticContext.addServlet(DefaultServlet.class, "/*"); staticContext.setDisplayName("static"); setContextAttributes(staticContext, conf); defaultContexts.put(staticContext, true);
"org.mortbay.jetty.servlet.Default.aliases", "true"); logContext.setDisplayName("logs"); SessionHandler handler = new SessionHandler(); SessionManager sm = handler.getSessionManager(); staticContext.setResourceBase(appDir + "/static"); staticContext.addServlet(DefaultServlet.class, "/*"); staticContext.setDisplayName("static"); @SuppressWarnings("unchecked") Map<String, String> params = staticContext.getInitParams();