Created
August 18, 2021 07:50
-
-
Save fercomunello/dc22158e688d7823e96815ef47adb167 to your computer and use it in GitHub Desktop.
This file contains 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.format.DateTimeFormatter" %> | |
<%@ page import="java.time.format.FormatStyle" %> | |
<jsp:useBean id="currentDate" type="java.time.LocalDate" scope="request" /> | |
<jsp:useBean id="user" type="java.lang.String" scope="request" /> | |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Jakarta EE - Demo</title> | |
<style> | |
body { | |
font-family: Arial, sans-serif; | |
} | |
img { | |
float: left; | |
margin-right: 3%; | |
} | |
</style> | |
</head> | |
<body> | |
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5d/Duke_%28Java_mascot%29_waving.svg/568px-Duke_%28Java_mascot%29_waving.svg.png" width="64" height="100" alt="Dukes"/> | |
<h1>Hello, ${user}!</h1> | |
<p><% DateTimeFormatter dateFormatter = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL); | |
out.print(dateFormatter.format(currentDate)); %> | |
</p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment