1

I am getting Date details in the format of XMLGregorianCalendar and I try to display it on the JSP page using struts tags:

<td><s:date name="issuedDate" format="dd/MM/yyyy" /></td>

But this date filed display nothing on the JSP page, could anybody help me to know how to get is displayed on the JSP page. I am getting these date objects of this type from a web service.

4

1 回答 1

1

Assuming that your issuedDate object is XMLGregorianCalendar type. You can call toGregorianCalendar() method of XMLGregorianCalendar right in <s:date> tag.

<td><s:date name="issuedDate.toGregorianCalendar()" format="dd/MM/yyyy" /></td>
于 2013-03-30T13:21:14.827 回答