if (myConnection.getResponseCode () == HttpURLConnection.HTTP_NOT_FOUND)
if (myConnection.getResponseCode () == HttpURLConnection.HTTP_NOT_FOUND) {
  public void execute(HttpServletRequest request, 		      HttpServletResponse response,		      SimpleServletSupport support) throws IOException, ServletException {    this.support = (ConditionSupport) support;    ConditionSupport conditionSupport = (ConditionSupport) support;    XMLable responseData = null;    super.execute (request, response, support);    if (setAllAgents) {      format = FORMAT_HTML;      List knownAgents = support.getAllEncodedAgentNames();      List validAgents = new ArrayList ();      for (Iterator iter = knownAgents.iterator(); iter.hasNext(); ) {	String agentName = (String) iter.next();	StringBuffer buf = new StringBuffer();	buf.append("http://");	buf.append(request.getServerName());	buf.append(":");	buf.append(request.getServerPort());	buf.append("/$");	buf.append(agentName);	buf.append(support.getPath());	buf.append("?" + ConditionServlet.CONDITION_PARAM + "="+numberFormat.format(doubleCondition));	String url = buf.toString();	if (support.getLog().isInfoEnabled()) {	  support.getLog().info(" In "+ support.getAgentIdentifier()+				", setting " + conditionSupport.getConditionName() + " on "+agentName+				", URL: "+url);	}	URL myURL = new URL(url);	HttpURLConnection myConnection = (HttpURLConnection) myURL.openConnection();	try {	  if (myConnection.getResponseCode () != HttpURLConnection.HTTP_OK) {	    if (myConnection.getResponseCode () == HttpURLConnection.HTTP_NOT_FOUND)	      support.getLog().info (support.getAgentIdentifier()+ 				     " - servlet not at agent.  Got NOT FOUND code reading from URL " + myURL);	    else	      support.getLog().error (support.getAgentIdentifier()+ 				      " - got error reading from URL " + myURL + " code was " + 				      myConnection.getResponseCode());	  }	  else {	    // throws an FileNotFoundExcep if no servlet at that agent	    InputStream is = myConnection.getInputStream(); 	    ObjectInputStream ois = new ObjectInputStream(is); 	    try {	      ConditionData settingData = (ConditionData)ois.readObject();	      if (settingData.wasSet())		validAgents.add (agentName);	      else		support.getLog().info (support.getAgentIdentifier()+ 				       " - Could not set " + 				       conditionSupport.getConditionName() + " on agent " + agentName);	    } catch (Exception e) { 	      support.getLog().error ("Got exception " + e, e);	    } finally {	      ois.close();	    }	  }	} catch (FileNotFoundException fnf) {	  if (support.getLog().isInfoEnabled())	    support.getLog().info ("Skipping agent " + agentName + " that has no Condition servlet.");	} catch (Exception other) {	  if (support.getLog().isWarnEnabled())	    support.getLog().warn ("Skipping agent " + agentName + " that has returned an exception.", other);	} finally {	  myConnection.disconnect();	}      }      responseData = new ResponseData (doubleCondition, validAgents, conditionSupport.getConditionName());    } else {      boolean val = setDoubleCondition (doubleCondition); // set in getSettings      responseData = new ConditionData(val); // return whether set successfully    }    writeResponse (responseData, response.getOutputStream(), request, support, format);  }