本文整理了Java中org.apache.coyote.Response.setMessage
方法的一些代码示例,展示了Response.setMessage
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.setMessage
方法的具体详情如下:
包路径:org.apache.coyote.Response
类名称:Response
方法名:setMessage
[英]Set the status message.
[中]设置状态消息。
代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib
/* */ /** @deprecated */
/* */ public void setStatus(int status, String message)
/* */ {
/* 1342 */ if (isCommitted()) {
/* 1343 */ return;
/* */ }
/* */
/* 1346 */ if (this.included) {
/* 1347 */ return;
/* */ }
/* 1349 */ this.coyoteResponse.setStatus(status);
/* 1350 */ this.coyoteResponse.setMessage(message);
/* */ }
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/**
* Set the HTTP status and message to be returned with this response.
*
* @param status The new HTTP status
* @param message The associated text message
*
* @deprecated As of Version 2.1 of the Java Servlet API, this method
* has been deprecated due to the ambiguous meaning of the message
* parameter.
*/
@Override
@Deprecated
public void setStatus(int status, String message) {
if (isCommitted())
return;
// Ignore any call from an included servlet
if (included)
return;
coyoteResponse.setStatus(status);
coyoteResponse.setMessage(message);
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
/**
* Set the HTTP status and message to be returned with this response.
*
* @param status The new HTTP status
* @param message The associated text message
*
* @deprecated As of Version 2.1 of the Java Servlet API, this method
* has been deprecated due to the ambiguous meaning of the message
* parameter.
*/
@Override
@Deprecated
public void setStatus(int status, String message) {
if (isCommitted()) {
return;
}
// Ignore any call from an included servlet
if (included) {
return;
}
coyoteResponse.setStatus(status);
coyoteResponse.setMessage(message);
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/**
* Set the HTTP status and message to be returned with this response.
*
* @param status The new HTTP status
* @param message The associated text message
*
* @deprecated As of Version 2.1 of the Java Servlet API, this method
* has been deprecated due to the ambiguous meaning of the message
* parameter.
*/
@Override
@Deprecated
public void setStatus(int status, String message) {
if (isCommitted())
return;
// Ignore any call from an included servlet
if (included)
return;
coyoteResponse.setStatus(status);
coyoteResponse.setMessage(message);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* Set the HTTP status and message to be returned with this response.
*
* @param status The new HTTP status
* @param message The associated text message
*
* @deprecated As of Version 2.1 of the Java Servlet API, this method
* has been deprecated due to the ambiguous meaning of the message
* parameter.
*/
@Override
@Deprecated
public void setStatus(int status, String message) {
if (isCommitted())
return;
// Ignore any call from an included servlet
if (included)
return;
coyoteResponse.setStatus(status);
coyoteResponse.setMessage(message);
}
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Set the HTTP status and message to be returned with this response.
*
* @param status The new HTTP status
* @param message The associated text message
*
* @deprecated As of Version 2.1 of the Java Servlet API, this method
* has been deprecated due to the ambiguous meaning of the message
* parameter.
*/
@Override
@Deprecated
public void setStatus(int status, String message) {
if (isCommitted()) {
return;
}
// Ignore any call from an included servlet
if (included) {
return;
}
coyoteResponse.setStatus(status);
coyoteResponse.setMessage(message);
}
代码示例来源:origin: jboss.web/jbossweb
/**
* Set the HTTP status and message to be returned with this response.
*
* @param status The new HTTP status
* @param message The associated text message
*
* @deprecated As of Version 2.1 of the Java Servlet API, this method
* has been deprecated due to the ambiguous meaning of the message
* parameter.
*/
public void setStatus(int status, String message) {
if (isCommitted())
return;
// Ignore any call from an included servlet
if (included)
return;
coyoteResponse.setStatus(status);
coyoteResponse.setMessage(message);
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Set the HTTP status and message to be returned with this response.
*
* @param status The new HTTP status
* @param message The associated text message
*
* @deprecated As of Version 2.1 of the Java Servlet API, this method
* has been deprecated due to the ambiguous meaning of the message
* parameter.
*/
@Override
@Deprecated
public void setStatus(int status, String message) {
if (isCommitted()) {
return;
}
// Ignore any call from an included servlet
if (included) {
return;
}
coyoteResponse.setStatus(status);
coyoteResponse.setMessage(message);
}
代码示例来源:origin: tomcat/catalina
/**
* Set the HTTP status and message to be returned with this response.
*
* @param status The new HTTP status
* @param message The associated text message
*
* @deprecated As of Version 2.1 of the Java Servlet API, this method
* has been deprecated due to the ambiguous meaning of the message
* parameter.
*/
public void setStatus(int status, String message) {
if (isCommitted())
return;
// Ignore any call from an included servlet
if (included)
return;
coyoteResponse.setStatus(status);
coyoteResponse.setMessage(message);
}
代码示例来源:origin: org.jboss.web/jbossweb
/**
* Set the HTTP status and message to be returned with this response.
*
* @param status The new HTTP status
* @param message The associated text message
*
* @deprecated As of Version 2.1 of the Java Servlet API, this method
* has been deprecated due to the ambiguous meaning of the message
* parameter.
*/
public void setStatus(int status, String message) {
if (isCommitted())
return;
// Ignore any call from an included servlet
if (included)
return;
coyoteResponse.setStatus(status);
coyoteResponse.setMessage(message);
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* Set the HTTP status and message to be returned with this response.
*
* @param status The new HTTP status
* @param message The associated text message
*
* @deprecated As of Version 2.1 of the Java Servlet API, this method
* has been deprecated due to the ambiguous meaning of the message
* parameter.
*/
@Override
@Deprecated
public void setStatus(int status, String message) {
if (isCommitted()) {
return;
}
// Ignore any call from an included servlet
if (included) {
return;
}
getCoyoteResponse().setStatus(status);
getCoyoteResponse().setMessage(message);
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
/**
* Set the HTTP status and message to be returned with this response.
*
* @param status The new HTTP status
* @param message The associated text message
*
* @deprecated As of Version 2.1 of the Java Servlet API, this method
* has been deprecated due to the ambiguous meaning of the message
* parameter.
*/
@Override
@Deprecated
public void setStatus(int status, String message) {
if (isCommitted()) {
return;
}
// Ignore any call from an included servlet
if (included) {
return;
}
getCoyoteResponse().setStatus(status);
getCoyoteResponse().setMessage(message);
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* Send an error response with the specified status and message.
*
* @param status HTTP status code to send
* @param message Corresponding message to send
*
* @exception IllegalStateException if this response has
* already been committed
* @exception IOException if an input/output error occurs
*/
@Override
public void sendError(int status, String message) throws IOException {
if (isCommitted()) {
throw new IllegalStateException
(sm.getString("coyoteResponse.sendError.ise"));
}
// Ignore any call from an included servlet
if (included) {
return;
}
setError();
getCoyoteResponse().setStatus(status);
getCoyoteResponse().setMessage(message);
// Clear any data content that has been buffered
resetBuffer();
// Cause the response to be finished (from the application perspective)
setSuspended(true);
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
/**
* Send an error response with the specified status and message.
*
* @param status HTTP status code to send
* @param message Corresponding message to send
*
* @exception IllegalStateException if this response has
* already been committed
* @exception IOException if an input/output error occurs
*/
@Override
public void sendError(int status, String message) throws IOException {
if (isCommitted()) {
throw new IllegalStateException
(sm.getString("coyoteResponse.sendError.ise"));
}
// Ignore any call from an included servlet
if (included) {
return;
}
setError();
getCoyoteResponse().setStatus(status);
getCoyoteResponse().setMessage(message);
// Clear any data content that has been buffered
resetBuffer();
// Cause the response to be finished (from the application perspective)
setSuspended(true);
}
代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib
/* */ public void sendError(int status, String message)
/* */ throws IOException
/* */ {
/* 1188 */ if (isCommitted()) {
/* 1189 */ throw new IllegalStateException(sm.getString("coyoteResponse.sendError.ise"));
/* */ }
/* */
/* 1193 */ if (this.included) {
/* 1194 */ return;
/* */ }
/* 1196 */ Wrapper wrapper = getRequest().getWrapper();
/* 1197 */ if (wrapper != null) {
/* 1198 */ wrapper.incrementErrorCount();
/* */ }
/* */
/* 1201 */ setError();
/* */
/* 1203 */ this.coyoteResponse.setStatus(status);
/* 1204 */ this.coyoteResponse.setMessage(message);
/* */
/* 1207 */ resetBuffer();
/* */
/* 1210 */ setSuspended(true);
/* */ }
/* */
代码示例来源:origin: tomcat/catalina
/**
* Send an error response with the specified status and message.
*
* @param status HTTP status code to send
* @param message Corresponding message to send
*
* @exception IllegalStateException if this response has
* already been committed
* @exception IOException if an input/output error occurs
*/
public void sendError(int status, String message)
throws IOException {
if (isCommitted())
throw new IllegalStateException
(sm.getString("coyoteResponse.sendError.ise"));
// Ignore any call from an included servlet
if (included)
return;
Wrapper wrapper = getRequest().getWrapper();
if (wrapper != null) {
wrapper.incrementErrorCount();
}
setError();
coyoteResponse.setStatus(status);
coyoteResponse.setMessage(message);
// Clear any data content that has been buffered
resetBuffer();
// Cause the response to be finished (from the application perspective)
setSuspended(true);
}
代码示例来源:origin: jboss.web/jbossweb
/**
* Send an error response with the specified status and message.
*
* @param status HTTP status code to send
* @param message Corresponding message to send
*
* @exception IllegalStateException if this response has
* already been committed
* @exception IOException if an input/output error occurs
*/
public void sendError(int status, String message)
throws IOException {
if (isCommitted())
throw new IllegalStateException
(sm.getString("coyoteResponse.sendError.ise"));
// Ignore any call from an included servlet
if (included)
return;
Wrapper wrapper = getRequest().getWrapper();
if (wrapper != null) {
wrapper.incrementErrorCount();
}
setError();
coyoteResponse.setStatus(status);
coyoteResponse.setMessage(message);
// Clear any data content that has been buffered
resetBuffer();
// Cause the response to be finished (from the application perspective)
setSuspended(true);
}
代码示例来源:origin: codefollower/Tomcat-Research
coyoteResponse.setMessage(message);
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
coyoteResponse.setMessage(message);
代码示例来源:origin: org.jboss.web/jbossweb
/**
* Send an error response with the specified status and message.
*
* @param status HTTP status code to send
* @param message Corresponding message to send
*
* @exception IllegalStateException if this response has
* already been committed
* @exception IOException if an input/output error occurs
*/
public void sendError(int status, String message)
throws IOException {
if (isCommitted())
throw MESSAGES.cannotSendError();
// Ignore any call from an included servlet
if (included)
return;
Wrapper wrapper = getRequest().getWrapper();
if (wrapper != null) {
wrapper.incrementErrorCount();
}
setError();
coyoteResponse.setStatus(status);
coyoteResponse.setMessage(message);
// Clear any data content that has been buffered
resetBuffer();
// Cause the response to be finished (from the application perspective)
setSuspended(true);
}
内容来源于网络,如有侵权,请联系作者删除!