From 76af0c01d2d2990e0d8b7a7ab4c64f93b3e43813 Mon Sep 17 00:00:00 2001 From: Yvan Date: Fri, 24 Jan 2025 14:56:20 +0000 Subject: [PATCH] popping in basic template page stubs --- .../dev/activitypub/activitypubbot/WebHandler.java | 12 ++++++++++++ .../src/main/webapp/WEB-INF/views/index.jsp | 11 +++++++---- .../src/main/webapp/WEB-INF/views/makebot.jsp | 10 ++++++++++ .../src/main/webapp/WEB-INF/views/viewbot.jsp | 10 ++++++++++ 4 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 Java/Spring/activitypubbot/src/main/webapp/WEB-INF/views/makebot.jsp create mode 100644 Java/Spring/activitypubbot/src/main/webapp/WEB-INF/views/viewbot.jsp diff --git a/Java/Spring/activitypubbot/src/main/java/dev/activitypub/activitypubbot/WebHandler.java b/Java/Spring/activitypubbot/src/main/java/dev/activitypub/activitypubbot/WebHandler.java index 4e9d215..ce24321 100644 --- a/Java/Spring/activitypubbot/src/main/java/dev/activitypub/activitypubbot/WebHandler.java +++ b/Java/Spring/activitypubbot/src/main/java/dev/activitypub/activitypubbot/WebHandler.java @@ -32,4 +32,16 @@ public class WebHandler { System.out.println("WebHandler::root"); return "index"; } + + // TODO: presumably there is some way to map things like / to capture string and attempt to resolve template + @RequestMapping("/viewbot") + public String viewbot() { + System.out.println("WebHandler::viewbot"); + return "viewbot"; + } + @RequestMapping("/makebot") + public String makebot() { + System.out.println("WebHandler::makebot"); + return "makebot"; + } } diff --git a/Java/Spring/activitypubbot/src/main/webapp/WEB-INF/views/index.jsp b/Java/Spring/activitypubbot/src/main/webapp/WEB-INF/views/index.jsp index 58a7967..aa13d58 100644 --- a/Java/Spring/activitypubbot/src/main/webapp/WEB-INF/views/index.jsp +++ b/Java/Spring/activitypubbot/src/main/webapp/WEB-INF/views/index.jsp @@ -2,11 +2,14 @@ -Spring Boot Form Handling Example +Spring Bot - an Activity Pub bot using the Spring Boot framework -

Spring Boot Form Handling Example

-

Spring Form Tags with JSP

- Click here +

Hello! Welcome to Spring Bot!

+

An Activity Pub 'bot' implementation using Spring Boot

+ diff --git a/Java/Spring/activitypubbot/src/main/webapp/WEB-INF/views/makebot.jsp b/Java/Spring/activitypubbot/src/main/webapp/WEB-INF/views/makebot.jsp new file mode 100644 index 0000000..758de3c --- /dev/null +++ b/Java/Spring/activitypubbot/src/main/webapp/WEB-INF/views/makebot.jsp @@ -0,0 +1,10 @@ + + + + +Make Bot - Spring Bot - an Activity Pub bot using the Spring Boot framework + + +

Make Yourself a Bot!

+ + diff --git a/Java/Spring/activitypubbot/src/main/webapp/WEB-INF/views/viewbot.jsp b/Java/Spring/activitypubbot/src/main/webapp/WEB-INF/views/viewbot.jsp new file mode 100644 index 0000000..c78b7e5 --- /dev/null +++ b/Java/Spring/activitypubbot/src/main/webapp/WEB-INF/views/viewbot.jsp @@ -0,0 +1,10 @@ + + + + +View Bot - Spring Bot - an Activity Pub bot using the Spring Boot framework + + +

Pick a Bot!

+ +