File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts Layout - date keyPattern exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Layout - date keyPattern exception" Watch "Struts Layout - date keyPattern exception" New topic

Struts Layout - date keyPattern exception

Alessandro Ilardo
Ranch Hand

Joined: Dec 23, 2005
Posts: 218
Hi there,
I'm using Struts Layout library, on Struts 1.2.9 - JBoss 4.0.5

I'm having some trouble on a JSP page with the layout ate tag. I need to date format as 25/12/2008, which should match the following pattern dd/MM/yyyy. Unfortunatly this is not accepted by the tag attribute, which returns an exception.

12:26:25,543 ERROR [InsertTag] ServletException in '/WEB-INF/jsp/shift/form-datePicker.jsp': Illegal pattern character 'e'
org.apache.jasper.JasperException: Exception in JSP: /WEB-INF/jsp/shift/form-datePicker.jsp:20

17: <layout:skin/>
18: <table>
19: <% // <layout ate value="gg/mm/aaaa" calendarTooltip="Seleziona la data" patternKey="${constants['it.federfarma.modena.struts.Constants.UTIL_DATE_PATTERN']}" property="${constants['it.federfarma.modena.struts.Constants.SHIFT_WEEK']}" mode="E,E,E" /> %>
20: <layout ate value="gg/mm/aaaa" patternKey="dd/MM/yyyy" calendarTooltip="Seleziona la data" property="week" mode="E,E,E" />
21: </table>
22: <br />
23: <span class="error"><html:errors property="${constants['it.federfarma.modena.struts.Constants.SHIFT_WEEK']}"/></span>


If a completely remove the attribute keyPattern, I have not esceptions, but the date remains as 25/12/08

Thanks in advance

trying to decode a woman mind....
I agree. Here's the link:
subject: Struts Layout - date keyPattern exception
It's not a secret anymore!