Format a date and display it using JSTL and EL

后端 未结 2 1698
栀梦
栀梦 2021-01-17 13:27

How do I format and display a Date object in a JSP, most preferably using JSTL and EL but any other solution is welcome? I can not change the bean object.

2条回答
  •  我在风中等你
    2021-01-17 14:06

    You need to add the following line of code to the head of your page and your code will work perfect. <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

提交回复
热议问题