304984  -  produce and provide component package for JAX-WS
diff --git a/releng.wtpbuilder/distribution/wtp.site/staticDropFiles/miscUtil.php b/releng.wtpbuilder/distribution/wtp.site/staticDropFiles/miscUtil.php
index 42a886e..285e61b 100644
--- a/releng.wtpbuilder/distribution/wtp.site/staticDropFiles/miscUtil.php
+++ b/releng.wtpbuilder/distribution/wtp.site/staticDropFiles/miscUtil.php
@@ -45,16 +45,25 @@
 	echo "</td>";
 }
 
-
+/*
+ * This function needs to add the subdir, if on mirrored server, but not add it if not,
+ * since assumed the calling page is such that a relative URL (already in subdir) is correct.
+ */
 function displayFileLineSubdir($downloadprefix, $subdir, $filename, $zipfilesize, $fileShortDescription) {
-       echo "<td align=\"right\" valign=\"top\" width=\"30%\">";
-       echo "<a href=\"$downloadprefix$subdir/$filename\">" . $fileShortDescription . "</a>";
-       echo "</td><td align=\"right\" valign=\"top\" width=\"3%\">";
-       echo $zipfilesize;
-       echo "</td>";
-       echo "<td align=\"right\" valign=\"top\" width=\"2%\">";
-       echo "[<a href=\"checksum/$filename.md5\">md5</a>]";
-       echo "</td>";
+	echo "<td align=\"right\" valign=\"top\" width=\"30%\">";
+	$fullURL=$downloadprefix.$subdir."/".$filename;
+	if (isMirrored($fullURL)) {
+		echo "<a href=\"" . $fullURL . "\">" . $fileShortDescription . "</a>";
+	}
+	else {
+		echo "<a href=\"" . $filename . "\">" . $fileShortDescription . "</a>";
+	}
+	echo "</td><td align=\"right\" valign=\"top\" width=\"3%\">";
+	echo $zipfilesize;
+	echo "</td>";
+	echo "<td align=\"right\" valign=\"top\" width=\"2%\">";
+	echo "[<a href=\"checksum/$filename.md5\">md5</a>]";
+	echo "</td>";
 }
 
 function displayFileLineWithSHA($downloadprefix, $filename, $zipfilesize, $fileShortDescription) {
@@ -69,31 +78,31 @@
 }
 
 function displayRepoFileLine($downloadprefix, $filename, $zipfilesize, $fileShortDescription) {
-       echo "<td align=\"right\" valign=\"top\" width=\"30%\">";
-       echo "<a href=\"$downloadprefix$filename\">" . $fileShortDescription . "</a>";
-       echo "</td><td align=\"right\" valign=\"top\" width=\"3%\">";
-       echo $zipfilesize;
-       echo "</td>";
+	echo "<td align=\"right\" valign=\"top\" width=\"30%\">";
+	echo "<a href=\"$downloadprefix$filename\">" . $fileShortDescription . "</a>";
+	echo "</td><td align=\"right\" valign=\"top\" width=\"3%\">";
+	echo $zipfilesize;
+	echo "</td>";
 }
 
 
 function displayp2repoarchives($zipfilename, $downloadprefix, $fileShortDescription, $label, $description) {
-              
-       $filename=$zipfilename.".zip";
-       if (file_exists($filename)) {
-              echo "<tr>";
-              
-              echo "<td align=\"left\" valign=\"top\" width=\"10%\"><b>".$label."</b></td>";
-              echo "<td align=\"left\" valign=\"top\">";
-              echo "<p>".$description."</p>";
-              echo "</td>";
-              
-              $zipfilesize=fileSizeForDisplay($filename);
-           
-              displayRepoFileLine($downloadprefix, $filename, $zipfilesize, $fileShortDescription);
 
-              echo "</tr>";
-       }
+	$filename=$zipfilename.".zip";
+	if (file_exists($filename)) {
+		echo "<tr>";
+
+		echo "<td align=\"left\" valign=\"top\" width=\"10%\"><b>".$label."</b></td>";
+		echo "<td align=\"left\" valign=\"top\">";
+		echo "<p>".$description."</p>";
+		echo "</td>";
+
+		$zipfilesize=fileSizeForDisplay($filename);
+			
+		displayRepoFileLine($downloadprefix, $filename, $zipfilesize, $fileShortDescription);
+
+		echo "</tr>";
+	}
 
 }