commit | cb7ec75e028ad475cfa2e24d97dcf4b5dc3e64f9 | [log] [tgz] |
---|---|---|
author | Carsten Ziegeler <cziegeler@apache.org> | Tue Feb 10 08:26:57 2009 +0000 |
committer | Carsten Ziegeler <cziegeler@apache.org> | Tue Feb 10 08:26:57 2009 +0000 |
tree | 05da589f1aaa197e50a90d2db4251a2e707cbbe6 | |
parent | 4438c799b557a64c81a871387e1b64635c7c430d [diff] |
Use sendError() instead of setStatus() for 404 and 500 responses. git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@742886 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentsServlet.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentsServlet.java index c1e7312..2a35a5a 100644 --- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentsServlet.java +++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentsServlet.java
@@ -71,11 +71,11 @@ { final RequestInfo reqInfo = new RequestInfo(request); if ( reqInfo.component == null && reqInfo.componentRequested ) { - response.setStatus(404); + response.sendError(404); return; } if ( !reqInfo.componentRequested ) { - response.setStatus(500); + response.sendError(500); return; } String op = request.getParameter( OPERATION ); @@ -99,7 +99,7 @@ IOException { final RequestInfo reqInfo = new RequestInfo(request); if ( reqInfo.component == null && reqInfo.componentRequested ) { - response.setStatus(404); + response.sendError(404); return; } if ( reqInfo.extension.equals("json") )
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java index f8968f3..2241930 100644 --- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java +++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
@@ -103,7 +103,7 @@ { final RequestInfo reqInfo = new RequestInfo(request); if ( reqInfo.bundle == null && reqInfo.bundleRequested ) { - response.setStatus(404); + response.sendError(404); return; } if ( reqInfo.extension.equals("json") ) @@ -122,7 +122,7 @@ { final RequestInfo reqInfo = new RequestInfo(req); if ( reqInfo.bundle == null && reqInfo.bundleRequested ) { - resp.setStatus(404); + resp.sendError(404); return; }