As to why this is happening, this seems to be expected behaviour.
As per the JSTL spec on the Oracle site:
9.9
<fmt:formatDate>
Null & Error Handling
- If
value
is null, remove the scoped variable if it is specified (see attributesvar
andscope
).- If
timeZone
is null or empty, it is handled as if it was missing.- If this action fails to determine a formatting locale, it uses
java.util.Date.toString()
as the output format.
So as per your error, if no locale is set on the server-side & the request also doesn't pass one either, JSTL is falling back to a toString()
call on the date, rather than e.g. the locale of the JVM settings.