本文整理了Java中org.mortbay.jetty.webapp.WebAppContext.setResourceBase()
方法的一些代码示例,展示了WebAppContext.setResourceBase()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppContext.setResourceBase()
方法的具体详情如下:
包路径:org.mortbay.jetty.webapp.WebAppContext
类名称:WebAppContext
方法名:setResourceBase
暂无
代码示例来源:origin: Qihoo360/XLearning
appWebAppContext.setContextPath("/static/xlWebApp");
String appDir = getClass().getClassLoader().getResource("xlWebApp").toString();
appWebAppContext.setResourceBase(appDir);
appWebAppContext.addServlet(DefaultServlet.class, "/*");
final String[] ALL_URLS = {"/*"};
代码示例来源:origin: Qihoo360/XLearning
appWebAppContext.setContextPath("/static/xlWebApp");
String appDir = getClass().getClassLoader().getResource("xlWebApp").toString();
appWebAppContext.setResourceBase(appDir);
appWebAppContext.addServlet(DefaultServlet.class, "/*");
final String[] ALL_URLS = {"/*"};
代码示例来源:origin: skyscreamer/yoga
public void run( boolean join ) throws Exception
{
context = new WebAppContext();
context.setResourceBase( "src/main/webapp" );
context.setContextPath( "/" );
context.setParentLoaderPriority( true );
context.setInitParams( Collections.singletonMap( "org.mortbay.jetty.servlet.Default.aliases", "true" ) );
server.setHandler( context );
server.start();
init();
if ( join )
{
server.join();
}
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
webapp.setResourceBase(args[2]);
webapp.setContextPath(URIUtil.SLASH);
contexts.addHandler(webapp);
代码示例来源:origin: org.apache.maven.plugins/maven-site-plugin
webapp.setResourceBase( tempWebappDirectory.getAbsolutePath() );
webapp.setAttribute( DoxiaFilter.SITE_RENDERER_KEY, siteRenderer );
webapp.getInitParams().put( "org.mortbay.jetty.servlet.Default.useFileMappedBuffer", "false" );
代码示例来源:origin: hadooparchitecturebook/fraud-detection-tutorial
webapp.setResourceBase("./webapp");
webapp.setWelcomeFiles(new String[]{"index.html"});
代码示例来源:origin: spring-projects/spring-hadoop-samples-old
/**
* @throws Exception
* @throws InterruptedException
*/
private static void createWebContainerWithWebXML() throws Exception,
InterruptedException {
String webappDirLocation = "src/main/resources/META-INF/webapp/";
Server server = new Server(8080);
WebAppContext root = new WebAppContext();
root.setContextPath("/");
root.setDescriptor(webappDirLocation + "/WEB-INF/web.xml");
root.setResourceBase(webappDirLocation);
root.setParentLoaderPriority(true);
server.setHandler(root);
server.start();
server.join();
}
}
代码示例来源:origin: org.apache.tajo/tajo-core
webAppContext.setDisplayName(name);
webAppContext.setContextPath("/");
webAppContext.setResourceBase(appDir + "/" + name);
webAppContext.setDescriptor(appDir + "/" + name + "/WEB-INF/web.xml");
代码示例来源:origin: apache/tajo
webAppContext.setDisplayName(name);
webAppContext.setContextPath("/");
webAppContext.setResourceBase(appDir + "/" + name);
webAppContext.setDescriptor(appDir + "/" + name + "/WEB-INF/web.xml");
代码示例来源:origin: hadooparchitecturebook/fraud-detection-tutorial
webapp.setResourceBase("./webapp");
webapp.setWelcomeFiles(new String[]{"index.html"});
代码示例来源:origin: spring-projects/spring-hadoop-samples-old
public void start() throws Exception {
this.server = new Server(this.port);
WebAppContext root = new WebAppContext();
root.setContextPath("/");
root.setDescriptor(webappDirLocation + "/web.xml");
root.setResourceBase(webappDirLocation);
root.setParentLoaderPriority(true);
this.server.setHandler(root);
this.server.setStopAtShutdown(true);
this.server.start();
databaseServer = org.h2.tools.Server.createTcpServer(new String[]{"-tcpAllowOthers"}).start();
this.server.join();
}
代码示例来源:origin: com.senseidb/sensei-core
senseiApp.setResourceBase(webappPath);
senseiApp.addServlet(springServletHolder, "/sensei-rpc/SenseiSpringRPCService");
senseiApp.addServlet(jmxServletHolder, "/admin/jmx/*");
内容来源于网络,如有侵权,请联系作者删除!