Created
December 16, 2020 08:24
-
-
Save heiwa4126/6f19a59fd906c4d83baa9009f2db5231 to your computer and use it in GitHub Desktop.
Tomcatの動作チェックに日付とTomcat、JDKのバージョンがでるやつがほしいと言われたので作ったやつ。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ | |
page import="java.time.*" | |
contentType="text/html; charset=utf8" | |
%><!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="utf-8"> | |
</head> | |
<title>Hello, Tomcat</title> | |
</head> | |
<body> | |
<% | |
LocalDateTime now = LocalDateTime.now(ZoneId.of("Asia/Tokyo")); | |
%><h1>Hello, Tomcat</h1> | |
<p>It's <strong><%= now %> +0900</strong>.</p> | |
<p>JDK version : <%= System.getProperty("java.version") %><br> | |
Tomcat Version : <%= application.getServerInfo() %></p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
webappsに適当なフォルダをmkdirして、そこへwgetとかcurl -Oしてください。時間は日本時間がいい、とか言われたのでそうなってます。あとsession="false"はあったほうがいいかも。