changeset 10:02b2fdfc07e2

ads.txt
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 29 Jul 2019 19:25:00 -0600
parents f28caccdec82
children da006a8e2c2b
files src/global/UrlMapperImpl.java src/global/web/Ads.java
diffstat 2 files changed, 26 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
diff -r f28caccdec82 -r 02b2fdfc07e2 src/global/UrlMapperImpl.java
--- a/src/global/UrlMapperImpl.java	Mon Jul 29 22:50:05 2019 +1000
+++ b/src/global/UrlMapperImpl.java	Mon Jul 29 19:25:00 2019 -0600
@@ -36,6 +36,9 @@
 		if( path.equals("/sitemap.txt") )
 			return new UrlMapping( global.web.Sitemap.class, Collections.<String,String[]>emptyMap() );
 
+		if( path.equals("/ads.txt") )
+			return new UrlMapping( global.web.Ads.class, Collections.<String,String[]>emptyMap() );
+
 		return null;
 	}
 }
diff -r f28caccdec82 -r 02b2fdfc07e2 src/global/web/Ads.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/global/web/Ads.java	Mon Jul 29 19:25:00 2019 -0600
@@ -0,0 +1,23 @@
+package global.web;
+
+import global.HtmlGlobalUtils;
+
+import java.io.PrintWriter;
+import java.io.IOException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+
+public final class Ads extends HttpServlet {
+	protected void service(HttpServletRequest request,HttpServletResponse response)
+		throws IOException
+	{
+		response.setContentType("text/plain");
+		response.setCharacterEncoding("UTF-8");
+		PrintWriter out = response.getWriter();
+
+		out.println("google.com, pub-6750305871516672, DIRECT, f08c47fec0942fa0");
+	}
+
+}