Console: Remove calls to deprecated two-arg setStatus()

This commit is contained in:
zzz
2016-10-21 21:38:55 +00:00
parent b6521ed884
commit 27cd1a6a6e
4 changed files with 6 additions and 4 deletions

View File

@@ -12,7 +12,8 @@
final String ERROR_MESSAGE = (String) request.getAttribute("javax.servlet.error.message");
if (ERROR_CODE != null && ERROR_MESSAGE != null) {
// this is deprecated but we don't want sendError()
response.setStatus(ERROR_CODE.intValue(), ERROR_MESSAGE);
//response.setStatus(ERROR_CODE.intValue(), ERROR_MESSAGE);
response.setStatus(ERROR_CODE.intValue());
}
// If it can't find the iframe or viewtheme.jsp I wonder if the whole thing blows up...
%>

View File

@@ -13,7 +13,8 @@
final Throwable ERROR_THROWABLE = (Throwable) request.getAttribute("javax.servlet.error.exception");
if (ERROR_CODE != null && ERROR_MESSAGE != null) {
// this is deprecated but we don't want sendError()
response.setStatus(ERROR_CODE.intValue(), ERROR_MESSAGE);
//response.setStatus(ERROR_CODE.intValue(), ERROR_MESSAGE);
response.setStatus(ERROR_CODE.intValue());
}
%>
<html><head>

View File

@@ -2,7 +2,7 @@
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%
response.setStatus(404, "Not Found");
response.setStatus(404);
%>
<html><head>
<%@include file="css.jsi" %>

View File

@@ -19,7 +19,7 @@
Searching...
<%
} else {
response.setStatus(403, "Bad");
response.setStatus(403);
String query = request.getParameter("query");
if (query == null || query.trim().length() <= 0) {
%>