From 247de5a7c9a3a6c5dd2da08c4a4a1a7d86936cc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=A1=E5=9D=82=E6=98=B4?= Date: Wed, 2 Apr 2025 11:09:38 +0800 Subject: [PATCH] archive: test jsp project --- test/jsp/.idea/MarsCodeWorkspaceAppSettings.xml | 6 ++++++ test/jsp/.idea/encodings.xml | 7 +++++++ test/jsp/.idea/misc.xml | 10 ++++++++++ test/jsp/.idea/vcs.xml | 6 ++++++ test/jsp/src/main/webapp/index.jsp | 14 ++++++++++---- 5 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 test/jsp/.idea/MarsCodeWorkspaceAppSettings.xml create mode 100644 test/jsp/.idea/encodings.xml create mode 100644 test/jsp/.idea/vcs.xml diff --git a/test/jsp/.idea/MarsCodeWorkspaceAppSettings.xml b/test/jsp/.idea/MarsCodeWorkspaceAppSettings.xml new file mode 100644 index 0000000..05ed8ba --- /dev/null +++ b/test/jsp/.idea/MarsCodeWorkspaceAppSettings.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/test/jsp/.idea/encodings.xml b/test/jsp/.idea/encodings.xml new file mode 100644 index 0000000..aa00ffa --- /dev/null +++ b/test/jsp/.idea/encodings.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/test/jsp/.idea/misc.xml b/test/jsp/.idea/misc.xml index 6ed36dd..e2044d1 100644 --- a/test/jsp/.idea/misc.xml +++ b/test/jsp/.idea/misc.xml @@ -1,4 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/test/jsp/.idea/vcs.xml b/test/jsp/.idea/vcs.xml new file mode 100644 index 0000000..b2bdec2 --- /dev/null +++ b/test/jsp/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/test/jsp/src/main/webapp/index.jsp b/test/jsp/src/main/webapp/index.jsp index dd88878..b05acff 100644 --- a/test/jsp/src/main/webapp/index.jsp +++ b/test/jsp/src/main/webapp/index.jsp @@ -1,13 +1,19 @@ +<%--load time info and show it in the browser--%> <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> +<%@ page import="java.util.Date" %> +<%@ page import="java.text.SimpleDateFormat" %> - JSP - Hello World + JSP - Show the server time -

<%= "Hello World!" %> +<% + Date date = new Date(); + SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String today = df.format(date); +%> +

Now is <%= today %>

-
-Hello Servlet \ No newline at end of file