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;
         }