本文整理了Java中org.mortbay.jetty.webapp.WebAppContext.getContextPath()
方法的一些代码示例,展示了WebAppContext.getContextPath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppContext.getContextPath()
方法的具体详情如下:
包路径:org.mortbay.jetty.webapp.WebAppContext
类名称:WebAppContext
方法名:getContextPath
暂无
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public String toString()
{
return this.getClass().getName()+"@"+Integer.toHexString(hashCode())+"{"+getContextPath()+","+(_war==null?getResourceBase():_war)+"}";
}
代码示例来源:origin: org.springframework.osgi/org.springframework.osgi.web
private File unpackBundle(Bundle bundle, WebAppContext wac) throws Exception {
// Could use Jetty temporary folder
// File extractedWebAppDir = new File(wac.getTempDirectory(), "webapp");
File tmpFile = File.createTempFile("jetty-" + wac.getContextPath().substring(1), ".osgi");
tmpFile.delete();
tmpFile.mkdir();
if (log.isDebugEnabled())
log.debug("Unpacking bundle " + OsgiStringUtils.nullSafeNameAndSymName(bundle) + " to folder ["
+ tmpFile.getCanonicalPath() + "] ...");
Utils.unpackBundle(bundle, tmpFile);
return tmpFile;
}
代码示例来源:origin: org.springframework.osgi/spring-osgi-web
private File unpackBundle(Bundle bundle, WebAppContext wac) throws Exception {
// Could use Jetty temporary folder
// File extractedWebAppDir = new File(wac.getTempDirectory(), "webapp");
File tmpFile = File.createTempFile("jetty-" + wac.getContextPath().substring(1), ".osgi");
tmpFile.delete();
tmpFile.mkdir();
if (log.isDebugEnabled())
log.debug("Unpacking bundle " + OsgiStringUtils.nullSafeNameAndSymName(bundle) + " to folder ["
+ tmpFile.getCanonicalPath() + "] ...");
Utils.unpackBundle(bundle, tmpFile);
return tmpFile;
}
代码示例来源:origin: org.springframework.osgi/org.springframework.osgi.web
public JettyWarDeployment(JettyContextUndeployer jettyWarUndeployer, Bundle bundle, WebAppContext wac) {
this.undeployer = jettyWarUndeployer;
this.webAppCtx = wac;
// create context
this.deploymentContext = new DefaultWarDeploymentContext(bundle, wac.getContextPath(), wac.getServletContext());
}
代码示例来源:origin: org.springframework.osgi/spring-osgi-web
public JettyWarDeployment(JettyContextUndeployer jettyWarUndeployer, Bundle bundle, WebAppContext wac) {
this.undeployer = jettyWarUndeployer;
this.webAppCtx = wac;
// create context
this.deploymentContext = new DefaultWarDeploymentContext(bundle, wac.getContextPath(), wac.getServletContext());
}
代码示例来源:origin: org.apache.isis.runtimes.dflt/webserver
private String baseFor(final Server jettyServer) {
final Connector connector = jettyServer.getConnectors()[0];
final String scheme = "http";
final String host = StringUtils.coalesce(connector.getHost(), "localhost");
final int port = connector.getPort();
final WebAppContext handler = (WebAppContext) jettyServer.getHandler();
final String contextPath = handler.getContextPath();
final StringBuilder buf = new StringBuilder();
final Formatter formatter = new Formatter(buf);
formatter.format("%s://%s:%d/%s", scheme, host, port, contextPath);
return appendSlashIfRequired(buf).toString();
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
public void dumpUrl()
{
Connector[] connectors = getServer().getConnectors();
for (int i=0;i<connectors.length;i++)
{
String connectorName = connectors[i].getName();
String displayName = getDisplayName();
if (displayName == null)
displayName = "WebApp@"+connectors.hashCode();
Log.info(displayName + " at http://" + connectorName + getContextPath());
}
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
String contextPath = getContextPath();
contextPath=contextPath.replace('/','_');
contextPath=contextPath.replace('.','_');
代码示例来源:origin: org.springframework.osgi/org.springframework.osgi.web
String contextPath = wac.getContextPath();
代码示例来源:origin: org.springframework.osgi/spring-osgi-web
String contextPath = wac.getContextPath();
代码示例来源:origin: org.sonatype.plexus/plexus-jetty6
logger.info( "Disabling TLD support for: {} (context path: {})", webapp.getDisplayName(), webapp.getContextPath() );
代码示例来源:origin: org.sonatype.plexus/plexus-jetty6
public void lifeCycleStarting( LifeCycle lifecycle )
{
if ( lifecycle instanceof ContextHandlerCollection )
{
Logger logger = Log.getLogger( getClass().getName() );
Handler[] childHandlers = ((ContextHandlerCollection) lifecycle).getChildHandlers();
if ( childHandlers != null && childHandlers.length > 0 )
{
for ( Handler child : childHandlers )
{
if ( child instanceof WebAppContext )
{
WebAppContext webapp = (WebAppContext) child;
if ( logger != null )
{
logger.info( "Injecting Plexus container for: {} (context path: {})", webapp.getDisplayName(),
webapp.getContextPath() );
}
PlexusContainer container = PlexusContainerHolder.get();
webapp.setAttribute( PlexusConstants.PLEXUS_KEY, container );
webapp.setClassLoader( container.getContainerRealm() );
}
}
}
}
}
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
Log.info("NO JSP Support for {}, did not find {}",_context.getContextPath(),servlet_class);
_hasJSP=false;
_jspServletClass=servlet_class="org.mortbay.servlet.NoJspServlet";
内容来源于网络,如有侵权,请联系作者删除!