org.apache.coyote.Response.setHeader()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(134)

本文整理了Java中org.apache.coyote.Response.setHeader方法的一些代码示例,展示了Response.setHeader的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.setHeader方法的具体详情如下:
包路径:org.apache.coyote.Response
类名称:Response
方法名:setHeader

Response.setHeader介绍

暂无

代码示例

代码示例来源:origin: jboss.remoting/jboss-remoting

public Object put(Object arg0, Object arg1)
{
 Object obj = internalMap.put(arg0, arg1);
 coyoteResponse.setHeader(String.valueOf(arg0), String.valueOf(arg1));
 return obj;
}

代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib

/*      */   public void setHeader(String name, String value)
/*      */   {
/* 1288 */     if (isCommitted()) {
/* 1289 */       return;
/*      */     }
/*      */ 
/* 1292 */     if (this.included) {
/* 1293 */       return;
/*      */     }
/* 1295 */     this.coyoteResponse.setHeader(name, value);
/*      */   }
/*      */

代码示例来源:origin: tomcat/catalina

/**
 * Set the specified header to the specified value.
 *
 * @param name Name of the header to set
 * @param value Value to be set
 */
public void setHeader(String name, String value) {
  if (isCommitted())
    return;
  // Ignore any call from an included servlet
  if (included)
    return;
  coyoteResponse.setHeader(name, value);
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Set the specified header to the specified value.
 *
 * @param name Name of the header to set
 * @param value Value to be set
 */
@Override
public void setHeader(String name, String value) {
  if (name == null || name.length() == 0 || value == null) {
    return;
  }
  if (isCommitted())
    return;
  // Ignore any call from an included servlet
  if (included)
    return;
  coyoteResponse.setHeader(name, value);
}

代码示例来源:origin: org.jboss.web/jbossweb

/**
 * Set the specified header to the specified value.
 *
 * @param name Name of the header to set
 * @param value Value to be set
 */
public void setHeader(String name, String value) {
  if (name == null || name.length() == 0 || value == null) {
    return;
  }
  if (isCommitted())
    return;
  // Ignore any call from an included servlet
  if (included)
    return;
  coyoteResponse.setHeader(name, value);
}

代码示例来源:origin: jboss.web/jbossweb

/**
 * Set the specified header to the specified value.
 *
 * @param name Name of the header to set
 * @param value Value to be set
 */
public void setHeader(String name, String value) {
  if (name == null || name.length() == 0 || value == null) {
    return;
  }
  if (isCommitted())
    return;
  // Ignore any call from an included servlet
  if (included)
    return;
  coyoteResponse.setHeader(name, value);
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
 * Set the specified header to the specified value.
 *
 * @param name Name of the header to set
 * @param value Value to be set
 */
@Override
public void setHeader(String name, String value) {
  if (name == null || name.length() == 0 || value == null) {
    return;
  }
  if (isCommitted())
    return;
  // Ignore any call from an included servlet
  if (included)
    return;
  coyoteResponse.setHeader(name, value);
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * Set the specified header to the specified value.
 *
 * @param name Name of the header to set
 * @param value Value to be set
 */
@Override
public void setHeader(String name, String value) {
  if (name == null || name.length() == 0 || value == null) {
    return;
  }
  if (isCommitted())
    return;
  // Ignore any call from an included servlet
  if (included)
    return;
  coyoteResponse.setHeader(name, value);
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

/**
 * Set the specified header to the specified value.
 *
 * @param name Name of the header to set
 * @param value Value to be set
 */
@Override
public void setHeader(String name, String value) {
  if (name == null || name.length() == 0 || value == null) {
    return;
  }
  if (isCommitted()) {
    return;
  }
  // Ignore any call from an included servlet
  if (included) {
    return;
  }
  coyoteResponse.setHeader(name, value);
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

/**
 * Set the specified header to the specified value.
 *
 * @param name Name of the header to set
 * @param value Value to be set
 */
@Override
public void setHeader(String name, String value) {
  if (name == null || name.length() == 0 || value == null) {
    return;
  }
  if (isCommitted()) {
    return;
  }
  // Ignore any call from an included servlet
  if (included) {
    return;
  }
  char cc=name.charAt(0);
  if (cc=='C' || cc=='c') {
    if (checkSpecialHeader(name, value))
    return;
  }
  coyoteResponse.setHeader(name, value);
}

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * Set the specified header to the specified value.
 *
 * @param name Name of the header to set
 * @param value Value to be set
 */
@Override
public void setHeader(String name, String value) {
  if (name == null || name.length() == 0 || value == null) {
    return;
  }
  if (isCommitted()) {
    return;
  }
  // Ignore any call from an included servlet
  if (included) {
    return;
  }
  char cc=name.charAt(0);
  if (cc=='C' || cc=='c') {
    if (checkSpecialHeader(name, value))
    return;
  }
  coyoteResponse.setHeader(name, value);
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

/**
 * Set the specified header to the specified value.
 *
 * @param name Name of the header to set
 * @param value Value to be set
 */
@Override
public void setHeader(String name, String value) {
  if (name == null || name.length() == 0 || value == null) {
    return;
  }
  if (isCommitted()) {
    return;
  }
  // Ignore any call from an included servlet
  if (included) {
    return;
  }
  char cc=name.charAt(0);
  if (cc=='C' || cc=='c') {
    if (checkSpecialHeader(name, value))
      return;
  }
  getCoyoteResponse().setHeader(name, value);
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Set the specified header to the specified value.
 *
 * @param name Name of the header to set
 * @param value Value to be set
 */
@Override
public void setHeader(String name, String value) {
  if (name == null || name.length() == 0 || value == null) {
    return;
  }
  if (isCommitted()) {
    return;
  }
  // Ignore any call from an included servlet
  if (included) {
    return;
  }
  char cc=name.charAt(0);
  if (cc=='C' || cc=='c') {
    if (checkSpecialHeader(name, value))
      return;
  }
  getCoyoteResponse().setHeader(name, value);
}

代码示例来源:origin: org.glassfish.metro/webservices-extra

outputBuffer.addActiveFilter(outputFilters[Constants.GZIP_FILTER]);
response.setHeader("Content-Encoding", "gzip");
response.setHeader("Vary", "Accept-Encoding");

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

res.setHeader("Allow", allow.toString());

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

res.setHeader("Allow", allow.toString());

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

if (upgradeProtocol.accept(request)) {
  response.setStatus(HttpServletResponse.SC_SWITCHING_PROTOCOLS);
  response.setHeader("Connection", "Upgrade");
  response.setHeader("Upgrade", requestedProtocol);
  action(ActionCode.CLOSE,  null);
  getAdapter().log(request, response, 0);
  response.setStatus(500);
  setErrorState(ErrorState.CLOSE_CLEAN, e);
  response.setHeader("Connection", "close"); // TODO: Remove

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

response.reset();
response.setStatus(500);
response.setHeader("Connection", "close");

代码示例来源:origin: codefollower/Tomcat-Research

response.reset();
response.setStatus(500);
response.setHeader("Connection", "close");

相关文章