org.apache.catalina.connector.Response.finishResponse()方法的使用及代码示例

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

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

Response.finishResponse介绍

[英]Perform whatever actions are required to flush and close the output stream or writer, in a single operation.
[中]在单个操作中执行刷新和关闭输出流或写入程序所需的任何操作。

代码示例

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

/**
 * Called to forward to the login page
 * 
 * @param request Request we are processing
 * @param response Response we are creating
 * @param config    Login configuration describing how authentication
 *              should be performed
 */
protected void forwardToLoginPage(Request request, Response response, LoginConfig config) {
  RequestDispatcher disp =
    context.getServletContext().getRequestDispatcher
    (config.getLoginPage());
  try {
    disp.forward(request.getRequest(), response.getResponse());
    response.finishResponse();
  } catch (Throwable t) {
    log.warn("Unexpected error forwarding to login page", t);
  }
}

代码示例来源:origin: org.jboss.jbossas/jboss-as-tomcat

/**
* Called to forward to the login page
* 
* @param request Request we are processing
* @param response Response we are creating
* @param config    Login configuration describing how authentication
*              should be performed
*/
protected void forwardToLoginPage(Request request, Response response, LoginConfig config) 
{
  RequestDispatcher disp =
    context.getServletContext().getRequestDispatcher
    (config.getLoginPage());
  try {
    disp.forward(request.getRequest(), response.getResponse());
    response.finishResponse();
  } catch (Throwable t) {
    log.warn("Unexpected error forwarding to login page", t);
  }
}

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

@Override
public void close() throws IOException {
  if (request == null) {
    throw new IllegalStateException(sm.getString("cometEvent.nullRequest"));
  }
  request.finishRequest();
  response.finishResponse();
  if (request.isComet()) {
    request.cometClose();
  }
}

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

@Override
public void close() throws IOException {
  if (request == null) {
    throw new IllegalStateException(sm.getString("cometEvent.nullRequest"));
  }
  request.finishRequest();
  response.finishResponse();
  if (request.isComet()) {
    request.cometClose();
  }
}

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

public void close() throws IOException {
  if (request == null) {
    throw new IllegalStateException(sm.getString("cometEvent.nullRequest"));
  }
  boolean iscomet = request.isComet();
  request.setComet(false);
  response.finishResponse();
  if (iscomet) request.cometClose();
}

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

@Override
public void close() throws IOException {
  if (request == null) {
    throw new IllegalStateException(sm.getString("cometEvent.nullRequest"));
  }
  request.finishRequest();
  response.finishResponse();
  if (request.isComet()) {
    request.cometClose();
  }
}

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

public void close() throws IOException {
  if (request == null) {
    throw new IllegalStateException(sm.getString("cometEvent.nullRequest"));
  }
  boolean iscomet = request.isComet();
  request.setComet(false);
  response.finishResponse();
  if (iscomet) request.cometClose();
}

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

public void close() throws IOException {
  if (request == null) {
    throw new IllegalStateException(sm.getString("cometEvent.nullRequest"));
  }
  boolean iscomet = request.isComet();
  request.setComet(false);
  response.finishResponse();
  if (iscomet) request.cometClose();
}

代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat6

/**
   * Called to forward to the error page
   *
   * @param request  Request we are processing
   * @param response Response we are creating
   */
  protected void forwardToErrorPage(Request request, Response response) {
    RequestDispatcher disp = request.getRequestDispatcher(erroryPage);
    try {
      disableClientCache(response.getResponse());
      disp.forward(request.getRequest(), response.getResponse());
      response.finishResponse();
    } catch (Throwable t) {
//            log.warn("Unexpected error forwarding to error page", t);
    }
  }

代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat6

/**
   * Called to forward to the login page
   *
   * @param request  Request we are processing
   * @param response Response we are creating
   */
  protected void forwardToLoginPage(Request request, Response response) {
    RequestDispatcher disp = request.getRequestDispatcher(loginPage);
    try {
      disableClientCache(response.getResponse());
      disp.forward(request.getRequest(), response.getResponse());
      response.finishResponse();
    } catch (Throwable t) {
//            log.warn("Unexpected error forwarding to login page", t);
    }
  }

代码示例来源:origin: com.tomitribe.tribestream/tribestream-container

private void flushResponseBytes(final long size) throws IOException {
  context.getResponse().flushBuffer();
  context.getResponse().finishResponse();
  context.getEventHandler().info("proxy", "Copied " + size + " bytes");
  context.getOut().setResponseSize(size);
}

代码示例来源:origin: org.glassfish.main.web/web-core

@Override
  public void onAfterService(final org.glassfish.grizzly.http.server.Request request) {
    final Request servletRequest = request.getNote(CATALINA_REQUEST_NOTE);
    final Response servletResponse = request.getNote(CATALINA_RESPONSE_NOTE);
    if (servletRequest != null) {
      try {
        if (!servletRequest.isUpgrade()) {
          servletResponse.finishResponse();
        } else {
          servletResponse.setUpgrade(servletRequest.isUpgrade());
        }
      } catch (Exception e) {
        log.log(Level.SEVERE, LogFacade.REQUEST_PROCESSING_EXCEPTION, e);
      } finally {
        try {
          servletRequest.unlockSession();
        } finally {
          servletRequest.recycle();
          servletResponse.recycle();
        }
      }
    }
  }
}

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

if (custom(request, response, errorPage)) {
  try {
    response.finishResponse();
  } catch (IOException e) {
    container.getLogger().warn("Exception Processing " + errorPage, e);

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

if (custom(request, response, errorPage)) {
  try {
    response.finishResponse();
  } catch (IOException e) {
    container.getLogger().warn("Exception Processing " + errorPage, e);

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

response.setErrorReported();
try {
  response.finishResponse();
} catch (ClientAbortException e) {

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

response.setErrorReported();
try {
  response.finishResponse();
} catch (ClientAbortException e) {

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

response.finishResponse();
req.action( ActionCode.ACTION_POST_REQUEST , null);

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

response.finishResponse();
req.action(ActionCode.POST_REQUEST , null);

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

response.finishResponse();
req.action(ActionCode.POST_REQUEST , null);

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

response.finishResponse();
req.action(ActionCode.POST_REQUEST , null);

相关文章

Response类方法