Showing the current date using JSTL formatDate tag
问题 I am trying to show the current date in my JSP page using JSTL. below is the code I am using. <jsp:useBean id="now" class="java.util.Date" scope="request" /> <fmt:formatDate value="${now}" pattern="MM.dd.yyyy" /> But the above code is not producing any results? Am I missing anything here or is there any better approach for this? I am using JSTL 1.1. 回答1: Try to print it without formatting, ${now}, you probably have null in there. Do you have this attribute in request scope? Just double check,