本文整理了Java中org.eclipse.jetty.webapp.WebAppContext.getErrorHandler()
方法的一些代码示例,展示了WebAppContext.getErrorHandler()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppContext.getErrorHandler()
方法的具体详情如下:
包路径:org.eclipse.jetty.webapp.WebAppContext
类名称:WebAppContext
方法名:getErrorHandler
暂无
代码示例来源:origin: org.eclipse.jetty/jetty-webapp
@Override
public void deconfigure (WebAppContext context) throws Exception
{
context.setWelcomeFiles(null);
if (context.getErrorHandler() instanceof ErrorPageErrorHandler)
((ErrorPageErrorHandler)
context.getErrorHandler()).setErrorPages(null);
// TODO remove classpaths from classloader
}
}
代码示例来源:origin: org.springframework.boot/spring-boot
@Override
public void configure(WebAppContext context) throws Exception {
ErrorHandler errorHandler = context.getErrorHandler();
context.setErrorHandler(new JettyEmbeddedErrorHandler(errorHandler));
addJettyErrorPages(errorHandler, getErrorPages());
}
代码示例来源:origin: gocd/gocd
@Test
public void shouldSetErrorHandlerForWebAppContext() throws Exception {
jetty9Server.configure();
jetty9Server.startHandlers();
WebAppContext webAppContext = (WebAppContext) getLoadedHandlers().get(WebAppContext.class);
assertThat(webAppContext.getErrorHandler() instanceof JettyCustomErrorPageHandler, is(true));
}
代码示例来源:origin: org.eclipse.jetty/jetty-webapp
if (!location.startsWith("/"))
throw new IllegalStateException("Missing leading '/' for location: " + location);
ErrorPageErrorHandler handler = (ErrorPageErrorHandler)context.getErrorHandler();
String originName = "error."+error;
switch (context.getMetaData().getOrigin(originName))
代码示例来源:origin: jenkinsci/winstone
@Override
public void deconfigure (WebAppContext context) throws Exception
{
context.setWelcomeFiles(null);
if (context.getErrorHandler() instanceof ErrorPageErrorHandler)
((ErrorPageErrorHandler)
context.getErrorHandler()).setErrorPages(null);
// TODO remove classpaths from classloader
}
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
@Override
public void deconfigure (WebAppContext context) throws Exception
{
ServletHandler _servletHandler = context.getServletHandler();
context.setWelcomeFiles(null);
if (context.getErrorHandler() instanceof ErrorPageErrorHandler)
((ErrorPageErrorHandler)
context.getErrorHandler()).setErrorPages(null);
// TODO remove classpaths from classloader
}
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
@Override
public void deconfigure (WebAppContext context) throws Exception
{
ServletHandler _servletHandler = context.getServletHandler();
context.setWelcomeFiles(null);
if (context.getErrorHandler() instanceof ErrorPageErrorHandler)
((ErrorPageErrorHandler)
context.getErrorHandler()).setErrorPages(null);
// TODO remove classpaths from classloader
}
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
@Override
public void deconfigure (WebAppContext context) throws Exception
{
ServletHandler _servletHandler = context.getServletHandler();
context.setWelcomeFiles(null);
if (context.getErrorHandler() instanceof ErrorPageErrorHandler)
((ErrorPageErrorHandler)
context.getErrorHandler()).setErrorPages(null);
// TODO remove classpaths from classloader
}
}
代码示例来源:origin: org.leapframework/leap-webunit
public TWebServer duplicateContext(String existsContextPath,String duplicateContextPath) throws IllegalStateException{
WebAppContext context = contexts.get(existsContextPath);
if(null == context){
throw new IllegalStateException("The given argument [existsContextPath] '" + existsContextPath + "' not exists");
}
if(contexts.containsKey(duplicateContextPath)){
throw new IllegalStateException("The given argument [duplicateContextPath] '" + duplicateContextPath + "' aleady exists");
}
WebAppContext duplicateContext = new WebAppContext();
duplicateContext.setContextPath(duplicateContextPath);
duplicateContext.setClassLoader(context.getClassLoader());
duplicateContext.setParentLoaderPriority(context.isParentLoaderPriority());
duplicateContext.setServer(server);
duplicateContext.setErrorHandler(context.getErrorHandler());
duplicateContext.setBaseResource(context.getBaseResource());
duplicateContext.setThrowUnavailableOnStartupException(context.isThrowUnavailableOnStartupException());
contexts.put(duplicateContextPath, duplicateContext);
return this;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
@Override
public void deconfigure (WebAppContext context) throws Exception
{
// TODO preserve any configuration that pre-existed.
ServletHandler _servletHandler = context.getServletHandler();
_servletHandler.setFilters(null);
_servletHandler.setFilterMappings(null);
_servletHandler.setServlets(null);
_servletHandler.setServletMappings(null);
context.setEventListeners(null);
context.setWelcomeFiles(null);
if (context.getErrorHandler() instanceof ErrorPageErrorHandler)
((ErrorPageErrorHandler)
context.getErrorHandler()).setErrorPages(null);
// TODO remove classpaths from classloader
}
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
@Override
public void deconfigure (WebAppContext context) throws Exception
{
// TODO preserve any configuration that pre-existed.
ServletHandler _servletHandler = context.getServletHandler();
_servletHandler.setFilters(null);
_servletHandler.setFilterMappings(null);
_servletHandler.setServlets(null);
_servletHandler.setServletMappings(null);
context.setEventListeners(null);
context.setWelcomeFiles(null);
if (context.getErrorHandler() instanceof ErrorPageErrorHandler)
((ErrorPageErrorHandler)
context.getErrorHandler()).setErrorPages(null);
// TODO remove classpaths from classloader
}
}
代码示例来源:origin: jenkinsci/winstone
if (!location.startsWith("/"))
throw new IllegalStateException("Missing leading '/' for location: " + location);
ErrorPageErrorHandler handler = (ErrorPageErrorHandler)context.getErrorHandler();
String originName = "error."+error;
switch (context.getMetaData().getOrigin(originName))
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
ErrorPageErrorHandler handler = (ErrorPageErrorHandler)context.getErrorHandler();
Origin o = context.getMetaData().getOrigin("error."+error);
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
ErrorPageErrorHandler handler = (ErrorPageErrorHandler)context.getErrorHandler();
Origin o = context.getMetaData().getOrigin("error."+error);
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
ErrorPageErrorHandler handler = (ErrorPageErrorHandler)context.getErrorHandler();
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
ErrorPageErrorHandler handler = (ErrorPageErrorHandler)context.getErrorHandler();
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
ErrorPageErrorHandler handler = (ErrorPageErrorHandler)context.getErrorHandler();
Origin o = context.getMetaData().getOrigin("error."+error);
代码示例来源:origin: org.eclipse.jetty/jetty-quickstart
Map<String,String> errorPages = ((ErrorPageErrorHandler)_webApp.getErrorHandler()).getErrorPages();
if (errorPages != null)
内容来源于网络,如有侵权,请联系作者删除!