commit b7233e0a6645f26ba227005159fd0ebe3ccd8423 Author: Karsten Loesing karsten.loesing@gmx.net Date: Mon Dec 12 11:47:43 2016 +0100
Add pages for News, Sources, etc. --- website/etc/web.xml | 44 ++++++++++++++++++++++ .../org/torproject/metrics/web/NewsServlet.java | 26 +++++++++++++ .../torproject/metrics/web/ResearchServlet.java | 26 +++++++++++++ .../org/torproject/metrics/web/SourcesServlet.java | 26 +++++++++++++ .../org/torproject/metrics/web/ToolsServlet.java | 26 +++++++++++++ website/web/WEB-INF/about.jsp | 27 +++++++++++-- website/web/WEB-INF/index.jsp | 23 ++++++++--- website/web/WEB-INF/news.jsp | 43 +++++++++++++++++++++ website/web/WEB-INF/research.jsp | 43 +++++++++++++++++++++ website/web/WEB-INF/sources.jsp | 43 +++++++++++++++++++++ website/web/WEB-INF/tools.jsp | 43 +++++++++++++++++++++ 11 files changed, 362 insertions(+), 8 deletions(-)
diff --git a/website/etc/web.xml b/website/etc/web.xml index 97400b7..17f6901 100644 --- a/website/etc/web.xml +++ b/website/etc/web.xml @@ -209,6 +209,50 @@ <url-pattern>/about.html</url-pattern> </servlet-mapping>
+ <servlet> + <servlet-name>NewsServlet</servlet-name> + <servlet-class> + org.torproject.metrics.web.NewsServlet + </servlet-class> + </servlet> + <servlet-mapping> + <servlet-name>NewsServlet</servlet-name> + <url-pattern>/news.html</url-pattern> + </servlet-mapping> + + <servlet> + <servlet-name>SourcesServlet</servlet-name> + <servlet-class> + org.torproject.metrics.web.SourcesServlet + </servlet-class> + </servlet> + <servlet-mapping> + <servlet-name>SourcesServlet</servlet-name> + <url-pattern>/sources.html</url-pattern> + </servlet-mapping> + + <servlet> + <servlet-name>ToolsServlet</servlet-name> + <servlet-class> + org.torproject.metrics.web.ToolsServlet + </servlet-class> + </servlet> + <servlet-mapping> + <servlet-name>ToolsServlet</servlet-name> + <url-pattern>/tools.html</url-pattern> + </servlet-mapping> + + <servlet> + <servlet-name>ResearchServlet</servlet-name> + <servlet-class> + org.torproject.metrics.web.ResearchServlet + </servlet-class> + </servlet> + <servlet-mapping> + <servlet-name>ResearchServlet</servlet-name> + <url-pattern>/research.html</url-pattern> + </servlet-mapping> + <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> diff --git a/website/src/org/torproject/metrics/web/NewsServlet.java b/website/src/org/torproject/metrics/web/NewsServlet.java new file mode 100644 index 0000000..5186dc6 --- /dev/null +++ b/website/src/org/torproject/metrics/web/NewsServlet.java @@ -0,0 +1,26 @@ +/* Copyright 2016 The Tor Project + * See LICENSE for licensing information */ + +package org.torproject.metrics.web; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class NewsServlet extends HttpServlet { + + private static final long serialVersionUID = -7696996243187241242L; + + @Override + public void doGet(HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException { + + /* Forward the request to the JSP that does all the hard work. */ + request.getRequestDispatcher("WEB-INF/news.jsp").forward(request, + response); + } +} + diff --git a/website/src/org/torproject/metrics/web/ResearchServlet.java b/website/src/org/torproject/metrics/web/ResearchServlet.java new file mode 100644 index 0000000..ed415b7 --- /dev/null +++ b/website/src/org/torproject/metrics/web/ResearchServlet.java @@ -0,0 +1,26 @@ +/* Copyright 2016 The Tor Project + * See LICENSE for licensing information */ + +package org.torproject.metrics.web; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class ResearchServlet extends HttpServlet { + + private static final long serialVersionUID = 7380914323836427960L; + + @Override + public void doGet(HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException { + + /* Forward the request to the JSP that does all the hard work. */ + request.getRequestDispatcher("WEB-INF/research.jsp").forward(request, + response); + } +} + diff --git a/website/src/org/torproject/metrics/web/SourcesServlet.java b/website/src/org/torproject/metrics/web/SourcesServlet.java new file mode 100644 index 0000000..98e37d1 --- /dev/null +++ b/website/src/org/torproject/metrics/web/SourcesServlet.java @@ -0,0 +1,26 @@ +/* Copyright 2016 The Tor Project + * See LICENSE for licensing information */ + +package org.torproject.metrics.web; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class SourcesServlet extends HttpServlet { + + private static final long serialVersionUID = 8809159168990390124L; + + @Override + public void doGet(HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException { + + /* Forward the request to the JSP that does all the hard work. */ + request.getRequestDispatcher("WEB-INF/sources.jsp").forward(request, + response); + } +} + diff --git a/website/src/org/torproject/metrics/web/ToolsServlet.java b/website/src/org/torproject/metrics/web/ToolsServlet.java new file mode 100644 index 0000000..d538512 --- /dev/null +++ b/website/src/org/torproject/metrics/web/ToolsServlet.java @@ -0,0 +1,26 @@ +/* Copyright 2016 The Tor Project + * See LICENSE for licensing information */ + +package org.torproject.metrics.web; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class ToolsServlet extends HttpServlet { + + private static final long serialVersionUID = -7868806710366794044L; + + @Override + public void doGet(HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException { + + /* Forward the request to the JSP that does all the hard work. */ + request.getRequestDispatcher("WEB-INF/tools.jsp").forward(request, + response); + } +} + diff --git a/website/web/WEB-INF/about.jsp b/website/web/WEB-INF/about.jsp index d5a6f78..91a696b 100644 --- a/website/web/WEB-INF/about.jsp +++ b/website/web/WEB-INF/about.jsp @@ -1,7 +1,7 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> - <title>Tor Metrics — About</title> + <title>Tor Metrics</title> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <link href="css/stylesheet-ltr.css" type="text/css" rel="stylesheet"> <link href="images/favicon.ico" type="image/x-icon" rel="shortcut icon"> @@ -9,8 +9,28 @@ <body> <div class="center"> <div class="main-column"> -<h2><a href="/"><img src="images/metrics-wordmark-small.png" width="138" height="18" alt="Metrics wordmark"></a> — About</h2> -<br> + <h2><a href="/"><img src="images/metrics-logo.png" width="153" +height="200" al +t="Metrics logo"><img src="images/metrics-wordmark.png" width="384" height="50" +alt="M +etrics wordmark"></a></h2> + <br> + +<p>"Tor metrics are the ammunition that lets Tor and other security +advocates argue for a more private and secure Internet from a position +of data, rather than just dogma or perspective." +<i>- Bruce Schneier (June 1, 2016)</i></p> + + <!-- Navigation start --> + <a href="index.html">Metrics</a> | + About | + <a href="news.html">News</a> | + <a href="sources.html">Sources</a> | + <a href="tools.html">Tools</a> | + <a href="research.html">Research</a> + <br> + <br> + <!-- Navigation end -->
<h3>Frequently used terms</h3> <br> @@ -280,3 +300,4 @@ Git</a>. </div> </body> </html> + diff --git a/website/web/WEB-INF/index.jsp b/website/web/WEB-INF/index.jsp index 68ea0bd..6e06474 100644 --- a/website/web/WEB-INF/index.jsp +++ b/website/web/WEB-INF/index.jsp @@ -13,6 +13,23 @@ <div class="main-column"> <h2><a href="/"><img src="images/metrics-logo.png" width="153" height="200" alt="Metrics logo"><img src="images/metrics-wordmark.png" width="384" height="50" alt="Metrics wordmark"></a></h2> <br> + +<p>"Tor metrics are the ammunition that lets Tor and other security +advocates argue for a more private and secure Internet from a position +of data, rather than just dogma or perspective." +<i>- Bruce Schneier (June 1, 2016)</i></p> + + <!-- Navigation start --> + Metrics | + <a href="about.html">About</a> | + <a href="news.html">News</a> | + <a href="sources.html">Sources</a> | + <a href="tools.html">Tools</a> | + <a href="research.html">Research</a> + <br> + <br> + <!-- Navigation end --> + <p>Welcome to Tor Metrics, the primary place to learn interesting facts about the Tor network, the largest deployed anonymity network to date. @@ -22,11 +39,6 @@ <a href="https://www.torproject.org/about/contact.html.en">let us know</a>.</small></p>
-<p>"Tor metrics are the ammunition that lets Tor and other security -advocates argue for a more private and secure Internet from a position -of data, rather than just dogma or perspective." -<i>- Bruce Schneier (June 1, 2016)</i></p> - <div> <div style="border:1px solid gray;border-radius:10px;padding:10px;float:left;overflow:hidden;margin-right:20px;"> <form action="/"> @@ -96,3 +108,4 @@ table { </div> </body> </html> + diff --git a/website/web/WEB-INF/news.jsp b/website/web/WEB-INF/news.jsp new file mode 100644 index 0000000..c47c1b8 --- /dev/null +++ b/website/web/WEB-INF/news.jsp @@ -0,0 +1,43 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> + <title>Tor Metrics</title> + <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> + <link href="css/stylesheet-ltr.css" type="text/css" rel="stylesheet"> + <link href="images/favicon.ico" type="image/x-icon" rel="shortcut icon"> +</head> +<body> + <div class="center"> + <div class="main-column"> + <h2><a href="/"><img src="images/metrics-logo.png" width="153" height="200" alt="Metrics logo"><img src="images/metrics-wordmark.png" width="384" height="50" alt="Metrics wordmark"></a></h2> + <br> + +<p>"Tor metrics are the ammunition that lets Tor and other security +advocates argue for a more private and secure Internet from a position +of data, rather than just dogma or perspective." +<i>- Bruce Schneier (June 1, 2016)</i></p> + + <!-- Navigation start --> + <a href="index.html">Metrics</a> | + <a href="about.html">About</a> | + News | + <a href="sources.html">Sources</a> | + <a href="tools.html">Tools</a> | + <a href="research.html">Research</a> + <br> + <br> + <!-- Navigation end --> + +<h3>News</h3> +<br> + + </div> + </div> + <div class="bottom" id="bottom"> + <%@ include file="footer.jsp"%> + </div> +</body> +</html> + diff --git a/website/web/WEB-INF/research.jsp b/website/web/WEB-INF/research.jsp new file mode 100644 index 0000000..648fdab --- /dev/null +++ b/website/web/WEB-INF/research.jsp @@ -0,0 +1,43 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> + <title>Tor Metrics</title> + <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> + <link href="css/stylesheet-ltr.css" type="text/css" rel="stylesheet"> + <link href="images/favicon.ico" type="image/x-icon" rel="shortcut icon"> +</head> +<body> + <div class="center"> + <div class="main-column"> + <h2><a href="/"><img src="images/metrics-logo.png" width="153" height="200" alt="Metrics logo"><img src="images/metrics-wordmark.png" width="384" height="50" alt="Metrics wordmark"></a></h2> + <br> + +<p>"Tor metrics are the ammunition that lets Tor and other security +advocates argue for a more private and secure Internet from a position +of data, rather than just dogma or perspective." +<i>- Bruce Schneier (June 1, 2016)</i></p> + + <!-- Navigation start --> + <a href="index.html">Metrics</a> | + <a href="about.html">About</a> | + <a href="news.html">News</a> | + <a href="sources.html">Sources</a> | + <a href="tools.html">Tools</a> | + Research + <br> + <br> + <!-- Navigation end --> + +<h3>Research</h3> +<br> + + </div> + </div> + <div class="bottom" id="bottom"> + <%@ include file="footer.jsp"%> + </div> +</body> +</html> + diff --git a/website/web/WEB-INF/sources.jsp b/website/web/WEB-INF/sources.jsp new file mode 100644 index 0000000..900bcb2 --- /dev/null +++ b/website/web/WEB-INF/sources.jsp @@ -0,0 +1,43 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> + <title>Tor Metrics</title> + <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> + <link href="css/stylesheet-ltr.css" type="text/css" rel="stylesheet"> + <link href="images/favicon.ico" type="image/x-icon" rel="shortcut icon"> +</head> +<body> + <div class="center"> + <div class="main-column"> + <h2><a href="/"><img src="images/metrics-logo.png" width="153" height="200" alt="Metrics logo"><img src="images/metrics-wordmark.png" width="384" height="50" alt="Metrics wordmark"></a></h2> + <br> + +<p>"Tor metrics are the ammunition that lets Tor and other security +advocates argue for a more private and secure Internet from a position +of data, rather than just dogma or perspective." +<i>- Bruce Schneier (June 1, 2016)</i></p> + + <!-- Navigation start --> + <a href="index.html">Metrics</a> | + <a href="about.html">About</a> | + <a href="news.html">News</a> | + Sources | + <a href="tools.html">Tools</a> | + <a href="research.html">Research</a> + <br> + <br> + <!-- Navigation end --> + +<h3>Sources</h3> +<br> + + </div> + </div> + <div class="bottom" id="bottom"> + <%@ include file="footer.jsp"%> + </div> +</body> +</html> + diff --git a/website/web/WEB-INF/tools.jsp b/website/web/WEB-INF/tools.jsp new file mode 100644 index 0000000..f27ece2 --- /dev/null +++ b/website/web/WEB-INF/tools.jsp @@ -0,0 +1,43 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> + <title>Tor Metrics</title> + <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> + <link href="css/stylesheet-ltr.css" type="text/css" rel="stylesheet"> + <link href="images/favicon.ico" type="image/x-icon" rel="shortcut icon"> +</head> +<body> + <div class="center"> + <div class="main-column"> + <h2><a href="/"><img src="images/metrics-logo.png" width="153" height="200" alt="Metrics logo"><img src="images/metrics-wordmark.png" width="384" height="50" alt="Metrics wordmark"></a></h2> + <br> + +<p>"Tor metrics are the ammunition that lets Tor and other security +advocates argue for a more private and secure Internet from a position +of data, rather than just dogma or perspective." +<i>- Bruce Schneier (June 1, 2016)</i></p> + + <!-- Navigation start --> + <a href="index.html">Metrics</a> | + <a href="about.html">About</a> | + <a href="news.html">News</a> | + <a href="sources.html">Sources</a> | + Tools | + <a href="research.html">Research</a> + <br> + <br> + <!-- Navigation end --> + +<h3>Tools</h3> +<br> + + </div> + </div> + <div class="bottom" id="bottom"> + <%@ include file="footer.jsp"%> + </div> +</body> +</html> +
tor-commits@lists.torproject.org