Commit 9ac503b0 authored by unknown's avatar unknown
Browse files

Initial multiple buttons test.

parent 37a93024
Pipeline #171095 passed with stages
in 52 seconds
...@@ -29,10 +29,15 @@ public class WebServer { ...@@ -29,10 +29,15 @@ public class WebServer {
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
String query = req.getParameter("q"); String query = req.getParameter("q");
if (query == null) { if (query == null) {
query = req.getParameter("dmd");
if (query == null){
new IndexPage().writeTo(resp); new IndexPage().writeTo(resp);
} else { }
else{
new MarkdownDownload(query, new QueryProcessor().process(query)).writeTo(resp); new MarkdownDownload(query, new QueryProcessor().process(query)).writeTo(resp);
//new HTMLResultPage(query, new QueryProcessor().process(query)).writeTo(resp); }
} else {
new HTMLResultPage(query, new QueryProcessor().process(query)).writeTo(resp);
} }
} }
} }
......
...@@ -20,8 +20,9 @@ public class IndexPage implements Page { ...@@ -20,8 +20,9 @@ public class IndexPage implements Page {
"<h1>Welcome!!</h1>" + "<h1>Welcome!!</h1>" +
"<p>Enter your query in the box below: " + "<p>Enter your query in the box below: " +
"<form>" + "<form>" +
"<input type=\"text\" name=\"q\" />" + "<input type=\"text\" />" +
"<br><br><input type=\"submit\">" + "<br><br><input type=\"submit\" name=\"q\" value=\"Submit\">" +
"<br><br><input type=\"submit\" name=\"dmd\" value=\"Download md\">" +
"</form>" + "</form>" +
"</p>"); "</p>");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment