本文整理了Java中org.mortbay.jetty.webapp.WebAppContext.setDescriptor()
方法的一些代码示例,展示了WebAppContext.setDescriptor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppContext.setDescriptor()
方法的具体详情如下:
包路径:org.mortbay.jetty.webapp.WebAppContext
类名称:WebAppContext
方法名:setDescriptor
暂无
代码示例来源: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.setContextPath("/");
webAppContext.setResourceBase(appDir + "/" + name);
webAppContext.setDescriptor(appDir + "/" + name + "/WEB-INF/web.xml");
代码示例来源:origin: org.apache.commons/commons-vfs2
private void prepareWebapp(final File file, final File repository, final File tmp) {
webapp.setContextPath("/");
webapp.setWar(file.getPath());
webapp.setClassLoader(JackrabbitMain.class.getClassLoader());
// we use a modified web.xml which has some servlets remove (which produce random empty directories)
final URL res = getResource("/jcrweb.xml");
if (res != null) {
webapp.setDescriptor(res.toString());
}
webapp.setExtractWAR(false);
webapp.setTempDirectory(tmp);
final ServletHolder servlet = new ServletHolder(JackrabbitRepositoryServlet.class);
servlet.setInitOrder(1);
servlet.setInitParameter("repository.home", repository.getAbsolutePath());
final String conf = command.getOptionValue("conf");
if (conf != null) {
servlet.setInitParameter("repository.config", conf);
}
webapp.addServlet(servlet, "/repository.properties");
}
代码示例来源:origin: apache/tajo
webAppContext.setContextPath("/");
webAppContext.setResourceBase(appDir + "/" + name);
webAppContext.setDescriptor(appDir + "/" + name + "/WEB-INF/web.xml");
代码示例来源:origin: apache/commons-vfs
private void prepareWebapp(final File file, final File repository, final File tmp) {
webapp.setContextPath("/");
webapp.setWar(file.getPath());
webapp.setClassLoader(JackrabbitMain.class.getClassLoader());
// we use a modified web.xml which has some servlets remove (which produce random empty directories)
final URL res = getResource("/jcrweb.xml");
if (res != null) {
webapp.setDescriptor(res.toString());
}
webapp.setExtractWAR(false);
webapp.setTempDirectory(tmp);
final ServletHolder servlet = new ServletHolder(JackrabbitRepositoryServlet.class);
servlet.setInitOrder(1);
servlet.setInitParameter("repository.home", repository.getAbsolutePath());
final String conf = command.getOptionValue("conf");
if (conf != null) {
servlet.setInitParameter("repository.config", conf);
}
webapp.addServlet(servlet, "/repository.properties");
}
代码示例来源: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();
}
内容来源于网络,如有侵权,请联系作者删除!