When I use the tag
<s:datetextfield format="dd-MM-yyyy"></s:datetextfield>
(where s is a prefix for struts tag) I get an exception:
org.apache.jasper.JasperException: Template not found for name "/template/bootstrap/datetextfield.ftl".
Do I have to declare/instantiate some date format object and pass it ?
It seems you're using the struts2-bootstrap-plugin, with the bootstrap theme;
it also seems that the bootstrap theme is unprovided of the freemarker template for the
<s:datetextfield />tag.Following the logic, the solution is to use a theme (for that tag only) that is provided of the appropriate
.ftl, in the following way:This however is a non-standard situation... it's the first time I see it happens. There is also a JIRA report about this, WW-4434.
I'm not sure what that tag does since I've neved used it and the documentation is broken, but if it's just about textfields, dates and datepickers, consider using native HTML5 datepickers (
<s:textfield type="date"/>) with appropriate fallbacks.