本文整理了Java中org.eclipse.jetty.webapp.WebAppContext.setExtractWAR()
方法的一些代码示例,展示了WebAppContext.setExtractWAR()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppContext.setExtractWAR()
方法的具体详情如下:
包路径:org.eclipse.jetty.webapp.WebAppContext
类名称:WebAppContext
方法名:setExtractWAR
暂无
代码示例来源:origin: org.simplericity.jettyconsole/jetty-console-core
@Override
public void beforeStart(WebAppContext context) {
context.setExtractWAR(extractWar);
}
}
代码示例来源:origin: mifos/head
@Override
protected WebAppContext createWebAppContext() throws Exception {
WebAppContext warCtx = new WebAppContext(warFile.toURI().toString(), "/" + getContext());
// http://mifosforge.jira.com/browse/MIFOS-4765
File warCtxTmpDir = new File(warFile.getParentFile(), warFile.getName() + "_tmp");
IO.delete(warCtxTmpDir);
warCtx.setTempDirectory(warCtxTmpDir);
warCtxTmpDir.deleteOnExit();
warCtx.setExtractWAR(true);
return warCtx;
}
代码示例来源:origin: stackoverflow.com
WebAppContext context = new WebAppContext();
context.setContextPath("/myWebApp");
context.setExtractWAR(false);
context.setDescriptor("/file/system/path/to/your/wab/app/WEB-INF/web.xml");
context.setResourceBase("/file/system/path/to/your/wab/app");
context.setConfigurationDiscovered(false);
HandlerList handlerList=new HandlerList();
handlerList.addHandler(webAppContext);
Server server = new Server(threadPool);
server.setHandler(handlerList);
server.start();
代码示例来源:origin: org.jruby.mains/jruby-mains
context.setServer(server);
context.setContextPath("/");
context.setExtractWAR(false);
context.setCopyWebInf(true);
代码示例来源:origin: de.saumya.mojo/jruby-mains
context.setServer(server);
context.setContextPath("/");
context.setExtractWAR(false);
context.setCopyWebInf(true);
代码示例来源:origin: com.github.jruby-gradle/jruby-gradle-plugin
public String addRepository(String url) {
if (urls.contains(url)) {
return null;
}
String path = "/" + url.replace("://", "_")
.replace(":", "_")
.replace("/", "_")
.replace(".", "_");
WebAppContext context = new WebAppContext();
context.setServer(server);
context.setContextPath(path);
context.setExtractWAR(false);
context.setCopyWebInf(true);
context.setWar(rubygemsWarURI);
context.setInitParameter("gem-caching-proxy-url", url);
context.setInitParameter("gem-caching-proxy-storage",
new File(cachedir, path).getAbsolutePath());
// do not setup other repos
context.setInitParameter("gem-proxy-storage", "");
context.setInitParameter("gem-hosted-storage", "");
context.setInitParameter("gem-merged", "false");
this.handlerCollection.addHandler(context);
return path + "/caching/maven/releases";
}
代码示例来源:origin: cd.connect.common/connect-runnable-war
context.setExtractWAR(false);
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
wah.setExtractWAR(_extractWars);
wah.setParentLoaderPriority(_parentLoaderPriority);
if (_configurationClasses != null)
代码示例来源:origin: works.lmz.common/common-runnable-war
context.setExtractWAR(false);
context.setSecurityHandler(new RemoteUserSecurityHandler());
代码示例来源:origin: org.eclipse.jetty/jetty-deploy
protected void initializeWebAppContextDefaults(WebAppContext webapp)
{
if (_defaultsDescriptor != null)
webapp.setDefaultsDescriptor(_defaultsDescriptor);
webapp.setExtractWAR(_extractWars);
webapp.setParentLoaderPriority(_parentLoaderPriority);
if (_configurationClasses != null)
webapp.setConfigurationClasses(_configurationClasses);
if (_tempDirectory != null)
{
/* Since the Temp Dir is really a context base temp directory,
* Lets set the Temp Directory in a way similar to how WebInfConfiguration does it,
* instead of setting the WebAppContext.setTempDirectory(File).
* If we used .setTempDirectory(File) all webapps will wind up in the
* same temp / work directory, overwriting each others work.
*/
webapp.setAttribute(WebAppContext.BASETEMPDIR, _tempDirectory);
}
}
代码示例来源:origin: org.fabric3/fabric3-container-web-jetty
private WebAppContext createWebAppContext(String contextPath, Map<String, List<Injector<?>>> injectors, List<URL> locations, ClassLoader parentClassLoader)
throws IOException {
WebAppContext context;
if (locations.size() == 1) {
context = new ManagedWebAppContext(locations.get(0).toExternalForm(), contextPath);
} else {
context = new ManagedWebAppContext(null, contextPath);
// add the resource paths
String[] paths = new String[locations.size()];
for (int i = 0; i < locations.size(); i++) {
URL location = locations.get(i);
paths[i] = (location.toExternalForm());
}
ResourceCollection resources = new ResourceCollection(paths);
context.setBaseResource(resources);
}
context.setParentLoaderPriority(true);
InjectingDecorator decorator = new InjectingDecorator(injectors);
context.getObjectFactory().addDecorator(decorator);
WebAppClassLoader webAppClassLoader = new WebAppClassLoader(parentClassLoader, context);
context.setClassLoader(webAppClassLoader);
// don't extract the war since this has already been done by the WAR classpath processor
context.setExtractWAR(false);
Configuration[] configurations = createConfigurations();
context.setConfigurations(configurations);
return context;
}
代码示例来源:origin: com.carecon.fabric3/fabric3-container-web-jetty
private WebAppContext createWebAppContext(String contextPath, Map<String, List<Injector<?>>> injectors, List<URL> locations, ClassLoader parentClassLoader)
throws IOException {
WebAppContext context;
if (locations.size() == 1) {
context = new ManagedWebAppContext(locations.get(0).toExternalForm(), contextPath);
} else {
context = new ManagedWebAppContext(null, contextPath);
// add the resource paths
String[] paths = new String[locations.size()];
for (int i = 0; i < locations.size(); i++) {
URL location = locations.get(i);
paths[i] = (location.toExternalForm());
}
ResourceCollection resources = new ResourceCollection(paths);
context.setBaseResource(resources);
}
context.setParentLoaderPriority(true);
InjectingDecorator decorator = new InjectingDecorator(injectors);
context.getObjectFactory().addDecorator(decorator);
WebAppClassLoader webAppClassLoader = new WebAppClassLoader(parentClassLoader, context);
context.setClassLoader(webAppClassLoader);
// don't extract the war since this has already been done by the WAR classpath processor
context.setExtractWAR(false);
Configuration[] configurations = createConfigurations();
context.setConfigurations(configurations);
return context;
}
代码示例来源:origin: org.jboss.arquillian.container/arquillian-jetty-embedded-9
webAppContext.setExtractWAR(true);
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
wah.setExtractWAR(_extractWars);
wah.setParentLoaderPriority(_parentLoaderPriority);
if (_configurationClasses != null)
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
wah.setExtractWAR(_extractWars);
wah.setParentLoaderPriority(_parentLoaderPriority);
if (_configurationClasses != null)
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
if (_defaultsDescriptor!=null)
wah.setDefaultsDescriptor(_defaultsDescriptor);
wah.setExtractWAR(_extract);
wah.setWar(app.toString());
wah.setParentLoaderPriority(_parentLoaderPriority);
代码示例来源:origin: jetty-project/i-jetty
wah.setDefaultsDescriptor(getDefaultsDescriptor());
wah.setExtractWAR(isExtract());
wah.setWar(app.toString());
wah.setParentLoaderPriority(isParentLoaderPriority());
代码示例来源:origin: org.eclipse.jetty.osgi/jetty-osgi-boot
_webApp.setExtractWAR(isExtract());
_webApp.setConfigurationClasses(getConfigurationClasses());
代码示例来源:origin: nutzam/nutz-web
wac = new WebAppContext(warUrlString, dc.getAppContextPath());
if (warUrlString.endsWith(".war") || dc.has("war")) {
wac.setExtractWAR(false);
wac.setCopyWebInf(true);
wac.setProtectedTargets(new String[]{"/java", "/javax", "/org", "/net", "/WEB-INF", "/META-INF"});
代码示例来源:origin: org.jboss.arquillian.container/arquillian-jetty-embedded-7
wctx.setExtractWAR(true);
wctx.setLogUrlOnStart(true);
内容来源于网络,如有侵权,请联系作者删除!