本文整理了Java中org.eclipse.jetty.webapp.WebAppContext.getDisplayName()
方法的一些代码示例,展示了WebAppContext.getDisplayName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppContext.getDisplayName()
方法的具体详情如下:
包路径:org.eclipse.jetty.webapp.WebAppContext
类名称:WebAppContext
方法名:getDisplayName
暂无
代码示例来源:origin: org.eclipse.jetty/jetty-webapp
@Override
public void setClassLoader(ClassLoader classLoader)
{
super.setClassLoader(classLoader);
String name = getDisplayName();
if (name==null)
name=getContextPath();
if (classLoader!=null && classLoader instanceof WebAppClassLoader && getDisplayName()!=null)
((WebAppClassLoader)classLoader).setName(name);
}
代码示例来源:origin: apache/hbase
@Override
public void addFilter(String name, String classname,
Map<String, String> parameters) {
final String[] USER_FACING_URLS = { "*.html", "*.jsp" };
defineFilter(webAppContext, name, classname, parameters, USER_FACING_URLS);
LOG.info("Added filter " + name + " (class=" + classname
+ ") to context " + webAppContext.getDisplayName());
final String[] ALL_URLS = { "/*" };
for (Map.Entry<ServletContextHandler, Boolean> e : defaultContexts.entrySet()) {
if (e.getValue()) {
ServletContextHandler handler = e.getKey();
defineFilter(handler, name, classname, parameters, ALL_URLS);
LOG.info("Added filter " + name + " (class=" + classname
+ ") to context " + handler.getDisplayName());
}
}
filterNames.add(name);
}
代码示例来源:origin: org.eclipse.jetty/jetty-webapp
private void dumpUrl()
{
Connector[] connectors = getServer().getConnectors();
for (int i=0;i<connectors.length;i++)
{
String displayName = getDisplayName();
if (displayName == null)
displayName = "WebApp@"+Arrays.hashCode(connectors);
LOG.info(displayName + " at http://" + connectors[i].toString() + getContextPath());
}
}
代码示例来源:origin: apache/hbase
LOG.error(
"Error while stopping listener for webapp"
+ webAppContext.getDisplayName(), e);
exception = addMultiException(exception, e);
} catch (Exception e) {
LOG.error("Error while stopping web app context for webapp "
+ webAppContext.getDisplayName(), e);
exception = addMultiException(exception, e);
} catch (Exception e) {
LOG.error("Error while stopping web server for webapp "
+ webAppContext.getDisplayName(), e);
exception = addMultiException(exception, e);
代码示例来源:origin: org.apache.hadoop/hadoop-common
@Override
public void addFilter(String name, String classname,
Map<String, String> parameters) {
FilterHolder filterHolder = getFilterHolder(name, classname, parameters);
final String[] USER_FACING_URLS = { "*.html", "*.jsp" };
FilterMapping fmap = getFilterMapping(name, USER_FACING_URLS);
defineFilter(webAppContext, filterHolder, fmap);
LOG.info(
"Added filter " + name + " (class=" + classname + ") to context "
+ webAppContext.getDisplayName());
final String[] ALL_URLS = { "/*" };
fmap = getFilterMapping(name, ALL_URLS);
for (Map.Entry<ServletContextHandler, Boolean> e
: defaultContexts.entrySet()) {
if (e.getValue()) {
ServletContextHandler ctx = e.getKey();
defineFilter(ctx, filterHolder, fmap);
LOG.info("Added filter " + name + " (class=" + classname
+ ") to context " + ctx.getDisplayName());
}
}
filterNames.add(name);
}
代码示例来源:origin: org.apache.hadoop/hadoop-common
LOG.error(
"Error while stopping listener for webapp"
+ webAppContext.getDisplayName(), e);
exception = addMultiException(exception, e);
} catch (Exception e) {
LOG.error("Error while stopping web app context for webapp "
+ webAppContext.getDisplayName(), e);
exception = addMultiException(exception, e);
} catch (Exception e) {
LOG.error("Error while stopping web server for webapp "
+ webAppContext.getDisplayName(), e);
exception = addMultiException(exception, e);
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
@Override
public void setClassLoader(ClassLoader classLoader)
{
super.setClassLoader(classLoader);
// if ( !(classLoader instanceof WebAppClassLoader) )
// {
// LOG.info("NOTE: detected a classloader which is not an instance of WebAppClassLoader being set on WebAppContext, some typical class and resource locations may be missing on: " + toString() );
// }
if (classLoader!=null && classLoader instanceof WebAppClassLoader && getDisplayName()!=null)
((WebAppClassLoader)classLoader).setName(getDisplayName());
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
@Override
public void setClassLoader(ClassLoader classLoader)
{
super.setClassLoader(classLoader);
// if ( !(classLoader instanceof WebAppClassLoader) )
// {
// LOG.info("NOTE: detected a classloader which is not an instance of WebAppClassLoader being set on WebAppContext, some typical class and resource locations may be missing on: " + toString() );
// }
if (classLoader!=null && classLoader instanceof WebAppClassLoader && getDisplayName()!=null)
((WebAppClassLoader)classLoader).setName(getDisplayName());
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
@Override
public void setClassLoader(ClassLoader classLoader)
{
super.setClassLoader(classLoader);
// if ( !(classLoader instanceof WebAppClassLoader) )
// {
// LOG.info("NOTE: detected a classloader which is not an instance of WebAppClassLoader being set on WebAppContext, some typical class and resource locations may be missing on: " + toString() );
// }
if (classLoader!=null && classLoader instanceof WebAppClassLoader && getDisplayName()!=null)
((WebAppClassLoader)classLoader).setName(getDisplayName());
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
@Override
public void setClassLoader(ClassLoader classLoader)
{
super.setClassLoader(classLoader);
// if ( !(classLoader instanceof WebAppClassLoader) )
// {
// LOG.info("NOTE: detected a classloader which is not an instance of WebAppClassLoader being set on WebAppContext, some typical class and resource locations may be missing on: " + toString() );
// }
if (classLoader!=null && classLoader instanceof WebAppClassLoader && getDisplayName()!=null)
((WebAppClassLoader)classLoader).setName(getDisplayName());
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
@Override
public void setClassLoader(ClassLoader classLoader)
{
super.setClassLoader(classLoader);
// if ( !(classLoader instanceof WebAppClassLoader) )
// {
// LOG.info("NOTE: detected a classloader which is not an instance of WebAppClassLoader being set on WebAppContext, some typical class and resource locations may be missing on: " + toString() );
// }
if (classLoader!=null && classLoader instanceof WebAppClassLoader && getDisplayName()!=null)
((WebAppClassLoader)classLoader).setName(getDisplayName());
}
代码示例来源:origin: jenkinsci/winstone
private void dumpUrl()
{
Connector[] connectors = getServer().getConnectors();
for (int i=0;i<connectors.length;i++)
{
String displayName = getDisplayName();
if (displayName == null)
displayName = "WebApp@"+Arrays.hashCode(connectors);
LOG.info(displayName + " at http://" + connectors[i].toString() + getContextPath());
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
private void dumpUrl()
{
Connector[] connectors = getServer().getConnectors();
for (int i=0;i<connectors.length;i++)
{
String displayName = getDisplayName();
if (displayName == null)
displayName = "WebApp@"+connectors.hashCode();
LOG.info(displayName + " at http://" + connectors[i].toString() + getContextPath());
}
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
private void dumpUrl()
{
Connector[] connectors = getServer().getConnectors();
for (int i=0;i<connectors.length;i++)
{
String displayName = getDisplayName();
if (displayName == null)
displayName = "WebApp@"+connectors.hashCode();
LOG.info(displayName + " at http://" + connectors[i].toString() + getContextPath());
}
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
private 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.eclipse.jetty.aggregate/jetty-plus
private 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.eclipse.jetty.aggregate/jetty-webapp
private 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: com.carecon.fabric3/fabric3-container-web-jetty
@Destroy
public void destroy() {
for (Holder holder : mappings.values()) {
try {
remove(holder.getContext());
} catch (Fabric3Exception e) {
monitor.error("Error removing managed bean for context: " + holder.getContext().getDisplayName(), e);
}
}
}
代码示例来源:origin: org.fabric3/fabric3-container-web-jetty
@Destroy
public void destroy() {
for (Holder holder : mappings.values()) {
try {
remove(holder.getContext());
} catch (Fabric3Exception e) {
monitor.error("Error removing managed bean for context: " + holder.getContext().getDisplayName(), e);
}
}
}
代码示例来源:origin: com.carecon.fabric3/fabric3-container-web-jetty
private void remove(WebAppContext context) {
String displayName = context.getDisplayName();
if (displayName == null) {
displayName = context.toString();
}
String webAppName = encodeName(displayName);
managementService.remove(webAppName, "webapps/" + webAppName);
ServletHandler handler = context.getServletHandler();
for (ServletHolder servletHolder : handler.getServlets()) {
final String group = "webapps/" + webAppName + "/servlets";
managementService.remove(webAppName + "/" + servletHolder.getName(), group);
}
}
内容来源于网络,如有侵权,请联系作者删除!