| Revision | 86 (tree) |
|---|---|
| Time | 2015-08-23 13:58:25 |
| Author | t_nakayama1971 |
(empty log message)
| @@ -142,9 +142,9 @@ | ||
| 142 | 142 | */ |
| 143 | 143 | public void copyResponse(final HttpServletResponse response) { |
| 144 | 144 | if (response != null) { |
| 145 | + this.dhr.copyResponse(response); | |
| 146 | + | |
| 145 | 147 | try { |
| 146 | - this.dhr.copyResponse(response); | |
| 147 | - | |
| 148 | 148 | // キャラクタ配列ライタ |
| 149 | 149 | if (this.charWriter != null) { |
| 150 | 150 | response.getWriter().write(this.charWriter.toString()); |
| @@ -17,6 +17,8 @@ | ||
| 17 | 17 | import javax.servlet.http.Cookie; |
| 18 | 18 | import javax.servlet.http.HttpServletResponse; |
| 19 | 19 | |
| 20 | +import org.apache.logging.log4j.LogManager; | |
| 21 | + | |
| 20 | 22 | import core.util.MapUtil; |
| 21 | 23 | |
| 22 | 24 | /** |
| @@ -392,9 +394,8 @@ | ||
| 392 | 394 | * レスポンス複製処理 |
| 393 | 395 | * |
| 394 | 396 | * @param response 複製対象レスポンス |
| 395 | - * @throws IOException IO例外 | |
| 396 | 397 | */ |
| 397 | - public void copyResponse(final HttpServletResponse response) throws IOException { | |
| 398 | + public void copyResponse(final HttpServletResponse response) { | |
| 398 | 399 | if (response == null) { |
| 399 | 400 | return; |
| 400 | 401 | } |
| @@ -407,19 +408,23 @@ | ||
| 407 | 408 | for (final Cookie cookie : this.cookieList) { |
| 408 | 409 | response.addCookie(cookie); |
| 409 | 410 | } |
| 410 | - // エラーコード | |
| 411 | - if (this.errorCode != null) { | |
| 412 | - // エラーメッセージ | |
| 413 | - if (this.errorMsg != null) { | |
| 414 | - response.sendError(this.errorCode.intValue(), this.errorMsg); | |
| 415 | - } else { | |
| 416 | - response.sendError(this.errorCode.intValue()); | |
| 411 | + try { | |
| 412 | + // エラーコード | |
| 413 | + if (this.errorCode != null) { | |
| 414 | + // エラーメッセージ | |
| 415 | + if (this.errorMsg != null) { | |
| 416 | + response.sendError(this.errorCode.intValue(), this.errorMsg); | |
| 417 | + } else { | |
| 418 | + response.sendError(this.errorCode.intValue()); | |
| 419 | + } | |
| 417 | 420 | } |
| 421 | + // リダイレクト先 | |
| 422 | + if (this.sendLocation != null) { | |
| 423 | + response.sendRedirect(this.sendLocation); | |
| 424 | + } | |
| 425 | + } catch (final IOException ex) { | |
| 426 | + LogManager.getLogger().info(ex.getMessage()); | |
| 418 | 427 | } |
| 419 | - // リダイレクト先 | |
| 420 | - if (this.sendLocation != null) { | |
| 421 | - response.sendRedirect(this.sendLocation); | |
| 422 | - } | |
| 423 | 428 | // ステータスコード |
| 424 | 429 | if (this.statusCode != null) { |
| 425 | 430 | response.setStatus(this.statusCode.intValue()); |