try { Object data; try{ ObjectInputStream obStream = new ObjectInputStream(in); data = obStream.readObject(); } catch (IOException e) { System.out.println("Expecting a POSTED Serialized \"Object\": " + e.getMessage()); data = null; } startUIDs = getSearchUIDs(data); } catch (RuntimeException e) { System.out.println("zero UIDs posted?: "+e.getMessage()); }
    public void execute(HttpServletRequest request, 			HttpServletResponse response) throws IOException, ServletException     {            this.htmlout = response.getWriter();            // create a URL parameter visitor      // set the parameters, store the map of (name, value) pairs for getting the uids            // parse the URL parameters      try {	parseParams(request);		// read the POSTed UIDs	try {	  Object data;	  try{	    ObjectInputStream obStream = new ObjectInputStream(in);	    data = obStream.readObject();	  } catch (IOException e) {	    System.out.println("Expecting a POSTED Serialized \"Object\": " + e.getMessage());	    data = null;	  }	  startUIDs = getSearchUIDs(data);	} catch (RuntimeException e) {	  System.out.println("zero UIDs posted?: "+e.getMessage());	}		// if zero UIDs were posted then look for a "?uid=" parameter	if ((startUIDs == null) &&	    //(optUID != null)) {	    (uid != null)) {	    startUIDs = new HashSet(1);	    //UID uid = UID.toUID(optUID);	    UID tmpuid = UID.toUID(uid);	  startUIDs.add(tmpuid);	}      } catch (Exception e) {	System.err.println("Unable to parse parameters:");	e.printStackTrace();		// handle as "null" search set	startUIDs = null;      }            // search      List l;      try {	l = 	  search(		 support,		 startUIDs,		 isDown,		 limit);      } catch (RuntimeException e) {	System.err.println("Unable to search for data:");	e.printStackTrace();		// send back a null	l = null;      }            // only need the ClusterID now      ClusterIdentifier cid = support.getAgentIdentifier();            // send back the results      try {	if (returnAsData) {	  replyWithData(			response, 			cid,			l);	} else {	  replyWithHTML(			htmlout, 			cid,			startUIDs,			isDown,			l);	}      } catch (Exception e) {	System.err.println("Unable to send response back:");	e.printStackTrace();      }            // done!    }