response.setDateHeader("Expires", -1);
JobTracker tracker = (JobTracker) application.getAttribute("job.tracker");
String trackerName = StringUtils.simpleHostname(tracker.getJobTrackerMachine());
JobTrackerJspHelper jspHelper = new JobTrackerJspHelper();
List<JobInProgress> runningJobs = tracker.getRunningJobs();
List<JobInProgress> completedJobs = tracker.getCompletedJobs();
List<JobInProgress> failedJobs = tracker.getFailedJobs();
out.write("<tracker_name>");
out.print(trackerName);
out.write("</tracker_name>");
out.write("<tracker>");
out.write("<state>");
out.print(tracker.getClusterStatus().getJobTrackerStatus());
out.write("</state>");
out.write("<started>");
out.print(new Date(tracker.getStartTime()));
out.write("</started>");
out.write("<version>");
out.print(VersionInfo.getVersion());
out.write("</version>");
out.write("<revision>");
out.print(VersionInfo.getRevision());
out.write("</revision>");
out.write("<compiled_at>");
out.print(VersionInfo.getDate());
out.write("</compiled_at>");
out.write("<compiled_by>");
out.print(VersionInfo.getUser());
out.write("</compiled_by>");
out.write("<identifier>");
out.print(tracker.getTrackerIdentifier());
out.write("</identifier>");
out.write("</tracker>");
out.write("<cluster_summary>");
jspHelper.generateSummaryTable(out, tracker);
out.write("</cluster_summary>");
out.write("<running_jobs>");
jspHelper.generateJobTable(out, "running", runningJobs);
out.write("</running_jobs>");
out.write("<completed_jobs>");
jspHelper.generateJobTable(out, "completed", completedJobs);
out.write("</completed_jobs>");
out.write("<failed_jobs>");
jspHelper.generateJobTable(out, "failed", failedJobs);
out.write("</failed_jobs>");
out.write("<retired_jobs>");
JSPUtil.generateRetiredJobXml(out, tracker,