%@ page contentType="text/xml"%>
<%
/**
* 04-02-2008
* Spyder Map include file, adapted from content_resource.jsp by Erez Bibi
*/
String cDomain = request.getServerName();
cDomain = cDomain.replaceAll("www.", "");
String cParm = "?domain=" + cDomain;
cParm += "&agent=" + java.net.URLEncoder.encode(request.getHeader("User-Agent"), "UTF-8");
cParm += "&referer=" + request.getHeader("referer");
cParm += "&address=" + request.getRemoteAddr();
cParm += "&query=" + request.getQueryString();
cParm += "&uri" + request.getRequestURI();
cParm += "&cScript=jsp";
String address = "http://www.mysearchexchange.com/ArticleSiteMap.asp" + cParm;
try {
java.net.URL blackwood = new java.net.URL(address);
java.net.URLConnection blackwoodConnection = blackwood.openConnection();
blackwoodConnection.setConnectTimeout(10000);
java.io.DataInputStream dis = new java.io.DataInputStream(blackwoodConnection.getInputStream());
String inputLine;
while ((inputLine = dis.readLine()) != null) {
out.print(inputLine + "\n");
}
dis.close(); // close the input stream (releases memory)
}
catch (java.net.MalformedURLException me) { // someone has messed around with the url code above
out.println("MalformedURLException: the url you are sending to the feed server is incorrect in some way.");
}
catch (java.net.SocketTimeoutException toe) {
out.println("Timeout");
}
catch (java.io.IOException ioe) { // any IO error, a 404 (not found) a major league time out etc etc
out.println("An error has occured in the streaming code, please review your settings. If your settings appear to be correct the error may be because the feed server is temporarly down.");
}