From a54e95211ab67689be41b2ce3748292f61a263e8 Mon Sep 17 00:00:00 2001 From: Mrin Date: Sat, 20 Oct 2018 13:37:57 -0700 Subject: [PATCH] Default page redirection --- README.md | 8 ++++---- web-api/src/main/webapp/index.html | 10 ---------- web-api/src/main/webapp/index.jsp | 15 ++------------- web-api/src/main/webapp/sample_index.jsp | 13 +++++++++++++ 4 files changed, 19 insertions(+), 27 deletions(-) delete mode 100644 web-api/src/main/webapp/index.html create mode 100644 web-api/src/main/webapp/sample_index.jsp diff --git a/README.md b/README.md index 1e18a21..58b888a 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ PROJECT_FOLDER - Build Frontend (optional step, requiered only if you make changes to fronend code ) - Build Backend -### Build Frontend (optional step) +#### To build frontend (optional step) ```bash # run these commands from web-ui folder @@ -74,7 +74,7 @@ yarn build ``` -### Build Backend +#### To build backend ```bash # run these commands from root folder where top-level pom.xml is present @@ -88,9 +88,9 @@ java -jar ./web-api/target/modules/web-api-1.0.0.jar ##### Once the App is running App Component | URLs --- | --- -URL for API Docs | http://localhost:8080/api-docs/index.html -URL to Access H2 DB | http://localhost:8082 +Access the web app | http://localhost:8080 URL for REST APIs | http://localhost:8080/api +URL for API Docs | http://localhost:8080/api-docs/index.html ## Backers Help me to host this app on AWS or Google-Cloud, for everyone to checkout the app. diff --git a/web-api/src/main/webapp/index.html b/web-api/src/main/webapp/index.html deleted file mode 100644 index c2c7b0b..0000000 --- a/web-api/src/main/webapp/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - Index.html - - -

Hello from index.html

- - \ No newline at end of file diff --git a/web-api/src/main/webapp/index.jsp b/web-api/src/main/webapp/index.jsp index b175046..d3c2e02 100644 --- a/web-api/src/main/webapp/index.jsp +++ b/web-api/src/main/webapp/index.jsp @@ -1,13 +1,2 @@ -<%@ page language="java" contentType="text/html;charset=UTF-8"%> -<%@ page import="java.text.*,java.util.*" %> - - - index.jsp - - -<% SimpleDateFormat sdf=new SimpleDateFormat("MM/dd/yyyy"); %> - - -

Welcome to index.jsp - Today is <%= sdf.format(new Date()) %>

- - +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<% response.sendRedirect("/ui/index.html"); %> \ No newline at end of file diff --git a/web-api/src/main/webapp/sample_index.jsp b/web-api/src/main/webapp/sample_index.jsp new file mode 100644 index 0000000..b175046 --- /dev/null +++ b/web-api/src/main/webapp/sample_index.jsp @@ -0,0 +1,13 @@ +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ page import="java.text.*,java.util.*" %> + + + index.jsp + + +<% SimpleDateFormat sdf=new SimpleDateFormat("MM/dd/yyyy"); %> + + +

Welcome to index.jsp - Today is <%= sdf.format(new Date()) %>

+ +