From a1f50008a0ffc8c585deb88464362238a8e68ffc Mon Sep 17 00:00:00 2001
From: Benjamin Culkin
Date: Sat, 18 May 2024 21:23:40 -0400
Subject: Initial commit
---
.../ashardalon/stachetype/jakarta/hello/Hello.java | 14 +++++
.../stachetype/jakarta/hello/HelloApplication.java | 9 +++
.../jakarta/hello/HelloWorldResource.java | 21 +++++++
src/main/webapp/WEB-INF/web.xml | 17 +++++
src/main/webapp/images/jakartaee_logo.jpg | Bin 0 -> 191273 bytes
src/main/webapp/index.html | 39 ++++++++++++
src/main/webapp/index.xhtml | 58 +++++++++++++++++
src/main/webapp/main.css | 69 +++++++++++++++++++++
8 files changed, 227 insertions(+)
create mode 100644 src/main/java/com/ashardalon/stachetype/jakarta/hello/Hello.java
create mode 100644 src/main/java/com/ashardalon/stachetype/jakarta/hello/HelloApplication.java
create mode 100644 src/main/java/com/ashardalon/stachetype/jakarta/hello/HelloWorldResource.java
create mode 100644 src/main/webapp/WEB-INF/web.xml
create mode 100644 src/main/webapp/images/jakartaee_logo.jpg
create mode 100644 src/main/webapp/index.html
create mode 100644 src/main/webapp/index.xhtml
create mode 100644 src/main/webapp/main.css
(limited to 'src')
diff --git a/src/main/java/com/ashardalon/stachetype/jakarta/hello/Hello.java b/src/main/java/com/ashardalon/stachetype/jakarta/hello/Hello.java
new file mode 100644
index 0000000..b0f7ad6
--- /dev/null
+++ b/src/main/java/com/ashardalon/stachetype/jakarta/hello/Hello.java
@@ -0,0 +1,14 @@
+package com.ashardalon.stachetype.jakarta.hello;
+
+public class Hello {
+
+ private String name;
+
+ public Hello(String name) {
+ this.name = name;
+ }
+
+ public String getHello(){
+ return name;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/ashardalon/stachetype/jakarta/hello/HelloApplication.java b/src/main/java/com/ashardalon/stachetype/jakarta/hello/HelloApplication.java
new file mode 100644
index 0000000..f8e20bd
--- /dev/null
+++ b/src/main/java/com/ashardalon/stachetype/jakarta/hello/HelloApplication.java
@@ -0,0 +1,9 @@
+package com.ashardalon.stachetype.jakarta.hello;
+
+import jakarta.ws.rs.core.Application;
+import jakarta.ws.rs.ApplicationPath;
+
+@ApplicationPath("rest")
+public class HelloApplication extends Application {
+
+}
diff --git a/src/main/java/com/ashardalon/stachetype/jakarta/hello/HelloWorldResource.java b/src/main/java/com/ashardalon/stachetype/jakarta/hello/HelloWorldResource.java
new file mode 100644
index 0000000..3669fa3
--- /dev/null
+++ b/src/main/java/com/ashardalon/stachetype/jakarta/hello/HelloWorldResource.java
@@ -0,0 +1,21 @@
+package com.ashardalon.stachetype.jakarta.hello;
+
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+import jakarta.ws.rs.core.MediaType;
+
+@Path("hello")
+public class HelloWorldResource {
+
+ @GET
+ @Produces({ MediaType.APPLICATION_JSON })
+ public Hello hello(@QueryParam("name") String name) {
+ if ((name == null) || name.trim().isEmpty()) {
+ name = "world";
+ }
+
+ return new Hello(name);
+ }
+}
\ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..4082750
--- /dev/null
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,17 @@
+
+
+ index.html
+
+
+ Faces Servlet
+ jakarta.faces.webapp.FacesServlet
+ 1
+
+
+ Faces Servlet
+ *.xhtml
+
+
diff --git a/src/main/webapp/images/jakartaee_logo.jpg b/src/main/webapp/images/jakartaee_logo.jpg
new file mode 100644
index 0000000..19f2d76
Binary files /dev/null and b/src/main/webapp/images/jakartaee_logo.jpg differ
diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html
new file mode 100644
index 0000000..b40d6e9
--- /dev/null
+++ b/src/main/webapp/index.html
@@ -0,0 +1,39 @@
+
+
+Welcome to Jakarta EE!
+
+
+ Welcome!
+
+ Welcome to Jakarta EE! This is a very
+ simple Jakarta EE application generated by the official Eclipse
+ Starter. It includes a simple "Hello World" RESTful service.
+
+
+
+
+
+ The REST end-point is available at rest/hello.
+ You can supply a name to the end-point using a query parameter like this: rest/hello?name=Jane
+
+ Learn more!
+ There are many excellent free resources to learn Jakarta EE! The following are some that you should begin exploring alongside the starter.
+
+ - The Jakarta EE Tutorial is a comprehensive reference
+ for developing applications with Jakarta EE.
+ - The First Cup is part of the Tutorial and is a gentle
+ hands-on introduction to Jakarta EE.
+ - You can further explore the First Cup Examples
+ to get a feel for how Jakarta EE applications look like.
+ - The Jakarta EE Tutorial Examples is a very
+ comprehensive resource showing you how to use many Jakarta EE APIs and features.
+ - The Eclipse Cargo Tracker project demonstrates first-hand how you can
+ develop applications with Jakarta EE using widely adopted architectural best practices like Domain-Driven Design (DDD).
+
+
+
+ We hope you enjoy your Jakarta EE journey!
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/index.xhtml b/src/main/webapp/index.xhtml
new file mode 100644
index 0000000..90d21a3
--- /dev/null
+++ b/src/main/webapp/index.xhtml
@@ -0,0 +1,58 @@
+
+
+
+
+ Welcome to Jakarta EE!
+
+
+
+
+
+
+
+
TITLE HEADING
+
Title description, Dec 7, 2017
+
+ Image
+
+
Some text..
+
+
+
TITLE HEADING
+
Title description, Sep 2, 2017
+
+ Image
+
+
Some text..
+
+
+
+
+
About Me
+
+ Image
+
+
+ Some text about me in culpa qui officia deserunt mollit anim..
+
+
+
+
Popular Post
+
Image
+
Image
+
Image
+
+
+
Follow Me
+
Some text..
+
+
+
+
+
+
+
diff --git a/src/main/webapp/main.css b/src/main/webapp/main.css
new file mode 100644
index 0000000..25c50c3
--- /dev/null
+++ b/src/main/webapp/main.css
@@ -0,0 +1,69 @@
+
+* {
+ box-sizing: border-box;
+}
+
+body {
+ font-family: Arial;
+ padding: 20px;
+ background: #f1f1f1;
+}
+
+/* Header/Blog Title */
+.header {
+ padding: 30px;
+ font-size: 40px;
+ text-align: center;
+ background: white;
+}
+
+/* Create two unequal columns that floats next to each other */
+/* Left column */
+.leftcolumn {
+ float: left;
+ width: 75%;
+}
+
+/* Right column */
+.rightcolumn {
+ float: left;
+ width: 25%;
+ padding-left: 20px;
+}
+
+/* Fake image */
+.fakeimg {
+ background-color: #aaa;
+ width: 100%;
+ padding: 20px;
+}
+
+/* Add a card effect for articles */
+.card {
+ background-color: white;
+ padding: 20px;
+ margin-top: 20px;
+}
+
+/* Clear floats after the columns */
+.row:after {
+ content: "";
+ display: table;
+ clear: both;
+}
+
+/* Footer */
+.footer {
+ padding: 20px;
+ text-align: center;
+ background: #ddd;
+ margin-top: 20px;
+}
+
+/* Responsive layout - when the screen is less than 800px wide, make the two columns stack on top of each other instead of next to each other */
+@media screen and (max-width: 800px) {
+ .leftcolumn, .rightcolumn {
+ width: 100%;
+ padding: 0;
+ }
+}
--
cgit v1.2.3