I have a JSP page with a java variable inside it which name is ${entry.date}
, type of this variable is Gregorian Calendar
and it places in a loop and generates a table of error log at last. now my question is that is it possible in my current page, by use of javascript
, I get the variable and converted to Solar Calendar
object and placed it again in a my html?
The output of ${entry.date}
is:
java.util.GregorianCalendar[time=1361788629000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="GMT+03:30",offset=12600000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2013,MONTH=1,WEEK_OF_YEAR=9,WEEK_OF_MONTH=5,DAY_OF_MONTH=25,DAY_OF_YEAR=56,DAY_OF_WEEK=2,DAY_OF_WEEK_IN_MONTH=4,AM_PM=1,HOUR=2,HOUR_OF_DAY=14,MINUTE=7,SECOND=9,MILLISECOND=0,ZONE_OFFSET=12600000,DST_OFFSET=0]
And the HTML Block is:
<c:forEach var="entry" items="${errorLog}">
<tr>
<td align="center" nowrap="nowrap">
<mytag:format dateTime="${entry.date}"/>
</td>
</tr>
</c:forEach>
<mytag:format>
comes from? And why do you want to do this in Javascript rather than in Java? – Etienne Miret Mar 11 at 12:10