I am currently trying to use scriptlets to enter the current year or locale date into page title and description like below. On the console, I get the error that is mentioned in the titles, causing the "org.apache.jasper.JasperException: Unable to compile class for JSP" error.
<tiles:param name="pageTitle">something something <%=(new java.util.Date()).getFullYear()%> something something </tiles:param>
<tiles:param name="pageDescription">Last Update: <%=(new java.util.Date()).toLocaleDateString()%>. more something something</tiles:param>
What am I doing wrong, and how do I fix it? I have imported the java class Date as this at the beginning of the page:
<%@ page import="java.util.Date" %>
You can try JSTL for printing date with some formatting.