Other necessary changes
[jabaws.git] / webservices / compbio / stat / servlet / ServiceStatus.java
index e4aaec0..01b538f 100644 (file)
@@ -21,7 +21,6 @@ import compbio.ws.client.WSTester;
  * Use cases:\r
  * <dl>\r
  * <li>Test web services and display results on the web page</li>\r
- * <li>Test web service or services by the user request</li>\r
  * </dl>\r
  * \r
  * @author pvtroshin\r
@@ -36,8 +35,7 @@ public class ServiceStatus extends HttpServlet {
                        throws ServletException, IOException {\r
 \r
                StringBuffer jabawspath = req.getRequestURL();\r
-               jabawspath = jabawspath.delete(jabawspath.lastIndexOf("/"),\r
-                               jabawspath.length());\r
+               jabawspath = jabawspath.delete(jabawspath.lastIndexOf("/"), jabawspath.length());\r
                String serverPath = jabawspath.toString();\r
 \r
                List<ServiceTestResult> testResults = new ArrayList<ServiceTestResult>();\r
@@ -51,8 +49,8 @@ public class ServiceStatus extends HttpServlet {
                                result.failed = tester.checkService(service);\r
                        } catch (Exception e) {\r
                                log.info(e, e.getCause());\r
-                               writer.println("Fails to connect to a web service: " + service\r
-                                               + " With " + e.getLocalizedMessage() + "\nDetails: ");\r
+                               String mess = "Fails to connect to the web service: " + service + ". Reason: ";\r
+                               writer.println(mess + e.getLocalizedMessage() + "\nDetails: ");\r
                                e.printStackTrace(writer);\r
                        } finally {\r
                                writer.close();\r
@@ -61,8 +59,7 @@ public class ServiceStatus extends HttpServlet {
                        testResults.add(result);\r
                }\r
                req.setAttribute("results", testResults);\r
-               RequestDispatcher rd = req\r
-                               .getRequestDispatcher("statpages/ServicesStatus.jsp");\r
+               RequestDispatcher rd = req.getRequestDispatcher("statpages/ServicesStatus.jsp");\r
                rd.forward(req, resp);\r
        }\r
 \r