code:     public void processAction(ActionRequest actionRequest,
              ActionResponse actionResponse) throws PortletException, IOException {
          String action = actionRequest.getParameter("action");
          actionResponse.setRenderParameter("action", action);
          if (action.equals("showView")) {
              String view_id = actionRequest.getParameter("view_id");
              actionResponse.setRenderParameter("view_id", view_id);
          } else if (action.equals("showAllViews")) {
              // no parameters needed to be redirected to doView()
          } else if (action.equals("showAllServers")) {
              // no parameters needed to be redirected to doView()
          } else if (action.equals("showAllGraphs")) {
              // no parameters needed to be redirected to doView()
          } else if (action.equals("showEditView")) {
              String view_id = actionRequest.getParameter("view_id");
              actionResponse.setRenderParameter("view_id", view_id);
          } else if (action.equals("saveEditView")) {
              updateView(actionRequest, actionResponse);
          } else if (action.equals("showAddView")) {
              // no parameters needed to be redirected to doView()
          } else if (action.equals("saveAddView")) {
              addView(actionRequest, actionResponse);
          } else if (action.equals("showAddGraph")) {
              String server_id = actionRequest.getParameter("server_id");
              if (server_id != null)
                  actionResponse.setRenderParameter("server_id", server_id);
  
              String mbean = actionRequest.getParameter("mbean");
              if (mbean != null)
                  actionResponse.setRenderParameter("mbean", mbean);
  
              String dataname = actionRequest.getParameter("dataname");
              if (dataname != null)
                  actionResponse.setRenderParameter("dataname", dataname);
          } else if (action.equals("saveAddGraph")) {
              addGraph(actionRequest, actionResponse);
          } else if (action.equals("showEditGraph")) {
              String graph_id = actionRequest.getParameter("graph_id");
              actionResponse.setRenderParameter("graph_id", graph_id);
          } else if (action.equals("saveEditGraph")) {
              updateGraph(actionRequest, actionResponse);
          } else if (action.equals("deleteGraph")) {
              deleteGraph(actionRequest, actionResponse);
          } else if (action.equals("deleteView")) {
              deleteView(actionRequest, actionResponse);
          } else if (action.equals("showServer")) {
              String server_id = actionRequest.getParameter("server_id");
              actionResponse.setRenderParameter("server_id", server_id);
          } else if (action.equals("showEditServer")) {
              String server_id = actionRequest.getParameter("server_id");
              actionResponse.setRenderParameter("server_id", server_id);
          } else if (action.equals("saveEditServer")) {
              updateServer(actionRequest, actionResponse);
          } else if (action.equals("showAddServer")) {
              // no parameters needed to be redirected to doView()
          } else if (action.equals("deleteServer")) {
              deleteServer(actionRequest, actionResponse);
          } else if (action.equals("saveAddServer")) {
              addServer(actionRequest, actionResponse);
          } else if (action.equals("startTrackingMbean")) {
              String server_id = actionRequest.getParameter("server_id");
              actionResponse.setRenderParameter("server_id", server_id);
              String mbean = actionRequest.getParameter("mbean");
              actionResponse.setRenderParameter("mbean", mbean);
          } else if (action.equals("stopTrackingMbean")) {
              String server_id = actionRequest.getParameter("server_id");
              actionResponse.setRenderParameter("server_id", server_id);
              String mbean = actionRequest.getParameter("mbean");
              actionResponse.setRenderParameter("mbean", mbean);
          } else if (action.equals("stopThread")
                  || action.equals("disableServerViewQuery")) {
              String server_id = actionRequest.getParameter("server_id");
              String message = stopThread(server_id);
              actionResponse.setRenderParameter("server_id", server_id);
              actionResponse.setRenderParameter("message", message);
          } else if (action.equals("startThread")
                  || action.equals("enableServerViewQuery")) {
              String server_id = actionRequest.getParameter("server_id");
              String snapshotDuration = actionRequest
                      .getParameter("snapshotDuration");
              String message = startThread(server_id, new Long(snapshotDuration));
              actionResponse.setRenderParameter("message", message);
              actionResponse.setRenderParameter("server_id", server_id);
              actionResponse.setRenderParameter("snapshotDuration",
                      snapshotDuration);
          } else if (action.equals("disableServer")
                  || action.equals("disableEditServer")) {
              String server_id = actionRequest.getParameter("server_id");
              actionResponse.setRenderParameter("server_id", server_id);
              ;
              actionResponse.setRenderParameter("message", alterServerState(
                      server_id, false));
          } else if (action.equals("enableServer")
                  || action.equals("enableEditServer")) {
              String server_id = actionRequest.getParameter("server_id");
              actionResponse.setRenderParameter("message", alterServerState(
                      server_id, true));
              actionResponse.setRenderParameter("server_id", server_id);
              ;
          } else if (action.equals("testAddServerConnection")) {
              String name = actionRequest.getParameter("name");
              String ip = actionRequest.getParameter("ip");
              String username = actionRequest.getParameter("username");
              String password = actionRequest.getParameter("password");
              String password2 = actionRequest.getParameter("password2");
              Integer port = Integer.parseInt(actionRequest.getParameter("port"));
              Integer protocol = Integer.parseInt(actionRequest.getParameter("protocol"));
              String message = testConnection(name, ip, username, password, port, protocol);
              actionResponse.setRenderParameter("message", message);
              actionResponse.setRenderParameter("name", name);
              actionResponse.setRenderParameter("username", username);
              actionResponse.setRenderParameter("ip", ip);
              //  Don't return the password in the output
  //            actionResponse.setRenderParameter("password", password);
  //            actionResponse.setRenderParameter("password2", password2);
              actionResponse.setRenderParameter("port", "" + port);
              actionResponse.setRenderParameter("protocol", "" + protocol); 
          } else if (action.equals("testEditServerConnection")) {
              String name = actionRequest.getParameter("name");
              String ip = actionRequest.getParameter("ip");
              String username = actionRequest.getParameter("username");
              String password = actionRequest.getParameter("password");
              String password2 = actionRequest.getParameter("password2");
              String server_id = actionRequest.getParameter("server_id");
              String snapshot = actionRequest.getParameter("snapshot");
              String retention = actionRequest.getParameter("retention");
              Integer port = Integer.parseInt(actionRequest.getParameter("port"));
              Integer protocol = Integer.parseInt(actionRequest.getParameter("protocol"));
              if(snapshot == null) {
                  snapshot = "";
              }
              if(retention == null) {
                  retention = "";
              }
              String message = testConnection(name, ip, username, password, port, protocol);
              actionResponse.setRenderParameter("message", message);
              actionResponse.setRenderParameter("name", name);
              actionResponse.setRenderParameter("username", username);
              actionResponse.setRenderParameter("ip", ip);
              //  Don't return the password in the output
  //            actionResponse.setRenderParameter("password", password);
  //            actionResponse.setRenderParameter("password2", password2);
              actionResponse.setRenderParameter("snapshot", snapshot);
              actionResponse.setRenderParameter("server_id", server_id);
              actionResponse.setRenderParameter("retention", retention);
              actionResponse.setRenderParameter("port", "" + port);
              actionResponse.setRenderParameter("protocol", "" + protocol);
          }
      }
  
  