- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.springframework.extensions.webscripts.WebScriptException.getStatus()
方法的一些代码示例,展示了WebScriptException.getStatus()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebScriptException.getStatus()
方法的具体详情如下:
包路径:org.springframework.extensions.webscripts.WebScriptException
类名称:WebScriptException
方法名:getStatus
[英]Get status code
[中]获取状态码
代码示例来源:origin: org.alfresco.surf/spring-surf
/**
* @see org.springframework.extensions.webscripts.AbstractRuntime#beforeProcessError(org.springframework.extensions.webscripts.Match, java.lang.Throwable)
*
* Override this hook to add special handling for "missing" WebScript components.
* The page renderer can safely ignore components that no longer map to a URL. It
* is recommended that that the debug flag is used to view missing webscript URLs.
*/
@Override
protected boolean beforeProcessError(Match match, Throwable e)
{
if (e instanceof WebScriptException && ((WebScriptException)e).getStatus() == HttpServletResponse.SC_NOT_FOUND)
{
// log info on server if we are debugging
if (logger.isDebugEnabled())
{
logger.debug(e.getMessage());
}
return false;
}
else
{
return super.beforeProcessError(match, e);
}
}
}
代码示例来源:origin: org.alfresco.surf/spring-webscripts
statusCode = we.getStatus();
statusTemplate = we.getStatusTemplate();
statusModel = we.getStatusModel();
代码示例来源:origin: deas/alfresco
if (e instanceof WebScriptException && (((WebScriptException)e).getStatus() == HttpServletResponse.SC_NOT_FOUND ||
((WebScriptException)e).getStatus() == HttpServletResponse.SC_UNAUTHORIZED))
String errorCode = ((WebScriptException)e).getStatus() == HttpServletResponse.SC_NOT_FOUND ? "NOT FOUND" : "UNAUTHORIZED";
logger.debug("Webscript did not execute. (" + errorCode + "): " + e.getMessage());
statusCode = we.getStatus();
statusTemplate = we.getStatusTemplate();
statusModel = we.getStatusModel();
代码示例来源:origin: org.springframework.extensions.surf/spring-surf
/**
* @see org.springframework.extensions.webscripts.AbstractRuntime#beforeProcessError(org.springframework.extensions.webscripts.Match, java.lang.Throwable)
*
* Override this hook to add special handling for "missing" WebScript components.
* The page renderer can safely ignore components that no longer map to a URL. It
* is recommended that that the debug flag is used to view missing webscript URLs.
*/
@Override
protected boolean beforeProcessError(Match match, Throwable e)
{
if (e instanceof WebScriptException && ((WebScriptException)e).getStatus() == HttpServletResponse.SC_NOT_FOUND)
{
// log info on server if we are debugging
if (logger.isDebugEnabled())
{
logger.debug(e.getMessage());
}
return false;
}
else
{
return super.beforeProcessError(match, e);
}
}
}
代码示例来源:origin: org.springframework.extensions.surf/spring-webscripts
if (e instanceof WebScriptException && (((WebScriptException)e).getStatus() == HttpServletResponse.SC_NOT_FOUND ||
((WebScriptException)e).getStatus() == HttpServletResponse.SC_UNAUTHORIZED))
String errorCode = ((WebScriptException)e).getStatus() == HttpServletResponse.SC_NOT_FOUND ? "NOT FOUND" : "UNAUTHORIZED";
logger.debug("Webscript did not execute. (" + errorCode + "): " + e.getMessage());
statusCode = we.getStatus();
statusTemplate = we.getStatusTemplate();
statusModel = we.getStatusModel();
代码示例来源:origin: deas/alfresco
public StatusTemplate getStatusTemplate()
{
int statusCode = we.getStatus();
String format = req.getFormat();
String scriptId = getDescription().getId();
return AbstractWebScript.this.getStatusTemplate(scriptId, statusCode, (format == null) ? "" : format);
}
});
代码示例来源:origin: org.alfresco.surf/spring-webscripts
public StatusTemplate getStatusTemplate()
{
int statusCode = we.getStatus();
String format = req.getFormat();
String scriptId = getDescription().getId();
return AbstractWebScript.this.getStatusTemplate(scriptId, statusCode, (format == null) ? "" : format);
}
});
代码示例来源:origin: org.springframework.extensions.surf/spring-webscripts
public StatusTemplate getStatusTemplate()
{
int statusCode = we.getStatus();
String format = req.getFormat();
String scriptId = getDescription().getId();
return AbstractWebScript.this.getStatusTemplate(scriptId, statusCode, (format == null) ? "" : format);
}
});
代码示例来源:origin: org.alfresco.surf/spring-webscripts
if (e instanceof WebScriptException && (((WebScriptException)e).getStatus() == HttpServletResponse.SC_NOT_FOUND ||
((WebScriptException)e).getStatus() == HttpServletResponse.SC_UNAUTHORIZED))
String errorCode = ((WebScriptException)e).getStatus() == HttpServletResponse.SC_NOT_FOUND ? "NOT FOUND" : "UNAUTHORIZED";
logger.debug("Webscript did not execute. (" + errorCode + "): " + e.getMessage());
本文整理了Java中org.springframework.extensions.webscripts.WebScriptException.getStatusModel()方法的一些代码示例,展示了
本文整理了Java中org.springframework.extensions.webscripts.WebScriptException.setStatusTemplateFactory()方法的
本文整理了Java中org.springframework.extensions.webscripts.WebScriptException.getStatus()方法的一些代码示例,展示了WebSc
本文整理了Java中org.springframework.extensions.webscripts.WebScriptException.()方法的一些代码示例,展示了WebScriptExcep
本文整理了Java中org.springframework.extensions.webscripts.WebScriptException.getStatusTemplate()方法的一些代码示例,
我是一名优秀的程序员,十分优秀!