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