本文整理了Java中org.mortbay.jetty.webapp.WebAppContext.<init>()
方法的一些代码示例,展示了WebAppContext.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppContext.<init>()
方法的具体详情如下:
包路径:org.mortbay.jetty.webapp.WebAppContext
类名称:WebAppContext
方法名:<init>
暂无
代码示例来源:origin: ltsopensource/light-task-scheduler
WebAppContext webapp = new WebAppContext();
webapp.setWar(confPath + "/war/lts-admin.war");
webapp.setContextPath(contextPath);
代码示例来源:origin: Qihoo360/XLearning
WebAppContext appWebAppContext = new WebAppContext();
appWebAppContext.setContextPath("/static/xlWebApp");
String appDir = getClass().getClassLoader().getResource("xlWebApp").toString();
代码示例来源:origin: Qihoo360/XLearning
HttpServer2 httpServer = webApp.httpServer();
WebAppContext webAppContext = httpServer.getWebAppContext();
WebAppContext appWebAppContext = new WebAppContext();
appWebAppContext.setContextPath("/static/xlWebApp");
String appDir = getClass().getClassLoader().getResource("xlWebApp").toString();
代码示例来源:origin: soabase/exhibitor
WebAppContext context = new WebAppContext();
context.setServer(server);
webXmlConfiguration.setWebAppContext(context);
代码示例来源:origin: com.mysema.commons/mysema-commons-jetty
public static JettyConfig startJetty(JettyConfig config) {
WebAppContext webappcontext = new WebAppContext();
webappcontext.setContextPath(config.contextPath);
webappcontext.setWar(config.warPath);
if (new File(config.warPath).isFile()) {
webappcontext.setExtractWAR(true);
}
return startJetty(config, webappcontext);
}
代码示例来源:origin: org.xworker/xworker_core
public static void createWebAppContext(ActionContext actionContext){
Thing self = (Thing) actionContext.get("self");
String contextPath = (String) self.doAction("getContextPath", actionContext);
String webApp = (String) self.doAction("getWebApp", actionContext);
Server server = (Server) actionContext.get("server");
WebAppContext context = new WebAppContext(webApp, contextPath);
server.addHandler(context);
}
代码示例来源:origin: org.apache.hive.shims/hive-shims-0.20
public void addWar(String war, String contextPath) {
WebAppContext wac = new WebAppContext();
wac.setContextPath(contextPath);
wac.setWar(war);
RequestLogHandler rlh = new RequestLogHandler();
rlh.setHandler(wac);
this.addHandler(rlh);
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
public void addWar(String war, String contextPath) {
WebAppContext wac = new WebAppContext();
wac.setContextPath(contextPath);
wac.setWar(war);
RequestLogHandler rlh = new RequestLogHandler();
rlh.setHandler(wac);
this.addHandler(rlh);
}
代码示例来源:origin: org.spark-project.hive.shims/hive-shims-0.20
public void addWar(String war, String contextPath) {
WebAppContext wac = new WebAppContext();
wac.setContextPath(contextPath);
wac.setWar(war);
RequestLogHandler rlh = new RequestLogHandler();
rlh.setHandler(wac);
this.addHandler(rlh);
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
public void addWar(String war, String contextPath) {
WebAppContext wac = new WebAppContext();
wac.setContextPath(contextPath);
wac.setWar(war);
RequestLogHandler rlh = new RequestLogHandler();
rlh.setHandler(wac);
this.addHandler(rlh);
}
代码示例来源:origin: edu.berkeley.cs.shark/hive-shims
public void addWar(String war, String contextPath) {
WebAppContext wac = new WebAppContext();
wac.setContextPath(contextPath);
wac.setWar(war);
RequestLogHandler rlh = new RequestLogHandler();
rlh.setHandler(wac);
this.addHandler(rlh);
}
代码示例来源:origin: com.github.hyukjinkwon.shims/hive-shims-0.20S
public void addWar(String war, String contextPath) {
WebAppContext wac = new WebAppContext();
wac.setContextPath(contextPath);
wac.setWar(war);
RequestLogHandler rlh = new RequestLogHandler();
rlh.setHandler(wac);
this.addHandler(rlh);
}
代码示例来源:origin: com.github.hyukjinkwon.shims/hive-shims-0.23
public void addWar(String war, String contextPath) {
WebAppContext wac = new WebAppContext();
wac.setContextPath(contextPath);
wac.setWar(war);
RequestLogHandler rlh = new RequestLogHandler();
rlh.setHandler(wac);
this.addHandler(rlh);
}
代码示例来源:origin: org.spark-project.hive.shims/hive-shims-0.23
public void addWar(String war, String contextPath) {
WebAppContext wac = new WebAppContext();
wac.setContextPath(contextPath);
wac.setWar(war);
RequestLogHandler rlh = new RequestLogHandler();
rlh.setHandler(wac);
this.addHandler(rlh);
}
代码示例来源:origin: net.disy.legato/legato-testing
@Override
public void addWebAppContext(final String contextPath, final String location) {
final WebAppContext webAppContext = new WebAppContext();
webAppContext.setContextPath(contextPath);
webAppContext.setConfigurationClasses(DEFAULT_CONFIGURATION_CLASSES);
webAppContext.setWar(location);
webAppContext
.setDefaultsDescriptor("net/disy/legato/testing/server/jetty/webapp/webdefault.xml");
// final ServletHolder servlet = webAppContext.getServletHandler()
// .getServlet("default");
// String aaa = servlet.getInitParameter("useFileMappedBuffer");
// servlet.setInitParameter("useFileMappedBuffer", "true");
server.addHandler(webAppContext);
}
代码示例来源:origin: info.aduna.commons/aduna-commons-net-http-server-embedded
public EmbeddedServer(String host, int port, String contextPath, String warPath) {
System.clearProperty("DEBUG");
jetty = new Server();
Connector conn = new BlockingChannelConnector();
conn.setHost(host);
conn.setPort(port);
jetty.addConnector(conn);
WebAppContext webapp = new WebAppContext();
webapp.setContextPath(contextPath);
webapp.setWar(warPath);
jetty.addHandler(webapp);
}
代码示例来源: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: NGDATA/lilyproject
private Server createServer() throws Exception {
if (this.useSolrCloud) {
// create path on zookeeper for solr cloud
ZooKeeperItf zk = ZkUtil.connect("localhost:2181", 10000);
ZkUtil.createPath(zk, "/solr");
zk.close();
}
Server server = new Server(solrPort);
WebAppContext ctx = new WebAppContext(solrWarPath, "/solr");
// The reason to change the classloading behavior was primarily so that the logging libraries would
// be inherited, and hence that Solr would use the same logging system & conf.
ctx.setParentLoaderPriority(true);
server.addHandler(ctx);
return server;
}
代码示例来源:origin: io.hops/hadoop-common
private static WebAppContext createWebAppContext(String name,
Configuration conf, AccessControlList adminsAcl, final String appDir) {
WebAppContext ctx = new WebAppContext();
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: 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();
}
内容来源于网络,如有侵权,请联系作者删除!