archive: test jsp project
This commit is contained in:
@@ -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" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>JSP - Hello World</title>
|
||||
<title>JSP - Show the server time</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1><%= "Hello World!" %>
|
||||
<%
|
||||
Date date = new Date();
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String today = df.format(date);
|
||||
%>
|
||||
<h1>Now is <%= today %>
|
||||
</h1>
|
||||
<br/>
|
||||
<a href="hello-servlet">Hello Servlet</a>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user