本文整理了Java中org.mortbay.jetty.webapp.WebAppContext.setWelcomeFiles()
方法的一些代码示例,展示了WebAppContext.setWelcomeFiles()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppContext.setWelcomeFiles()
方法的具体详情如下:
包路径:org.mortbay.jetty.webapp.WebAppContext
类名称:WebAppContext
方法名:setWelcomeFiles
暂无
代码示例来源:origin: ch.cern.hadoop/hadoop-common
private static WebAppContext createWebAppContext(String name,
Configuration conf, AccessControlList adminsAcl, final String appDir) {
WebAppContext ctx = new WebAppContext();
ctx.setDefaultsDescriptor(null);
ServletHolder holder = new ServletHolder(new DefaultServlet());
Map<String, String> params = ImmutableMap. <String, String> builder()
.put("acceptRanges", "true")
.put("dirAllowed", "false")
.put("gzip", "true")
.put("useFileMappedBuffer", "true")
.build();
holder.setInitParameters(params);
ctx.setWelcomeFiles(new String[] {"index.html"});
ctx.addServlet(holder, "/");
ctx.setDisplayName(name);
ctx.setContextPath("/");
ctx.setWar(appDir + "/" + name);
ctx.getServletContext().setAttribute(CONF_CONTEXT_ATTRIBUTE, conf);
ctx.getServletContext().setAttribute(ADMINS_ACL, adminsAcl);
addNoCacheFilter(ctx);
return ctx;
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-common
private static WebAppContext createWebAppContext(String name,
Configuration conf, AccessControlList adminsAcl, final String appDir) {
WebAppContext ctx = new WebAppContext();
ctx.setDefaultsDescriptor(null);
ServletHolder holder = new ServletHolder(new DefaultServlet());
Map<String, String> params = ImmutableMap. <String, String> builder()
.put("acceptRanges", "true")
.put("dirAllowed", "false")
.put("gzip", "true")
.put("useFileMappedBuffer", "true")
.build();
holder.setInitParameters(params);
ctx.setWelcomeFiles(new String[] {"index.html"});
ctx.addServlet(holder, "/");
ctx.setDisplayName(name);
ctx.setContextPath("/");
ctx.setWar(appDir + "/" + name);
ctx.getServletContext().setAttribute(CONF_CONTEXT_ATTRIBUTE, conf);
ctx.getServletContext().setAttribute(ADMINS_ACL, adminsAcl);
addNoCacheFilter(ctx);
return ctx;
}
代码示例来源:origin: io.hops/hadoop-common
private static WebAppContext createWebAppContext(String name,
Configuration conf, AccessControlList adminsAcl, final String appDir) {
WebAppContext ctx = new WebAppContext();
ctx.setDefaultsDescriptor(null);
ServletHolder holder = new ServletHolder(new DefaultServlet());
Map<String, String> params = ImmutableMap. <String, String> builder()
.put("acceptRanges", "true")
.put("dirAllowed", "false")
.put("gzip", "true")
.put("useFileMappedBuffer", "true")
.build();
holder.setInitParameters(params);
ctx.setWelcomeFiles(new String[] {"index.html"});
ctx.addServlet(holder, "/");
ctx.setDisplayName(name);
ctx.setContextPath("/");
ctx.setWar(appDir + "/" + name);
ctx.getServletContext().setAttribute(CONF_CONTEXT_ATTRIBUTE, conf);
ctx.getServletContext().setAttribute(ADMINS_ACL, adminsAcl);
addNoCacheFilter(ctx);
return ctx;
}
代码示例来源:origin: hadooparchitecturebook/fraud-detection-tutorial
webapp.setContextPath("/fe");
webapp.setResourceBase("./webapp");
webapp.setWelcomeFiles(new String[]{"index.html"});
代码示例来源:origin: hadooparchitecturebook/fraud-detection-tutorial
webapp.setContextPath("/fe");
webapp.setResourceBase("./webapp");
webapp.setWelcomeFiles(new String[]{"index.html"});
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public void deconfigureWebApp() throws Exception
{
// TODO preserve any configuration that pre-existed.
_servletHandler = getWebAppContext().getServletHandler();
_servletHandler.setFilters(null);
_servletHandler.setFilterMappings(null);
_servletHandler.setServlets(null);
_servletHandler.setServletMappings(null);
getWebAppContext().setEventListeners(null);
getWebAppContext().setWelcomeFiles(null);
if (getWebAppContext().getSecurityHandler() != null)
getWebAppContext().getSecurityHandler().setConstraintMappings(null);
if (getWebAppContext().getErrorHandler() instanceof ErrorPageErrorHandler)
((ErrorPageErrorHandler)getWebAppContext().getErrorHandler()).setErrorPages(null);
// TODO remove classpaths from classloader
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
getWebAppContext().setWelcomeFiles((String[])LazyList.toArray(_welcomeFiles,String.class));
getWebAppContext().getSecurityHandler().setConstraintMappings((ConstraintMapping[])LazyList.toArray(_constraintMappings, ConstraintMapping.class));
内容来源于网络,如有侵权,请联系作者删除!