[SPAM] RE: [opencms-dev] Display Date on JSP

Kelley, Kevin kkelley at onetooneinteractive.com
Wed Aug 31 17:19:28 CEST 2005


Works Great, Thanks!

 

-----Original Message-----
From: Ivo Pescia [mailto:ivo.pescia at numcom.com] 
Sent: Saturday, August 27, 2005 10:15 AM
To: 'The OpenCms mailing list'
Subject: [SPAM] RE: [opencms-dev] Display Date on JSP
Importance: Low

 

<%@ page session="false" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> 
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>


 

<c:set var="dateString"><cms:contentshow element="Release"/></c:set>
<% 
 java.util.Date date = new java.util.Date(); 
 
date.setTime(Long.parseLong(pageContext.getAttribute("dateString").toStr
ing())); 
 pageContext.setAttribute("date", date); 
%> 
<fmt:formatDate value="${date}" type="date" pattern="dd.MM.yyyy"  /> 

 

 

 


 

that's how we solved it, don't know if there are more elegant ways.

we just needed it once so the above code is enough for us.

 

hth

Ivo

  _____  

From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Kelley, Kevin
Sent: Mittwoch, 31. August 2005 16:07
To: opencms-dev at opencms.org
Subject: [opencms-dev] Display Date on JSP

Product: OpenCms 6

 

Are there any JSP taglibs built in to take the output of:

 

<cms:contentshow element="PublishDate"/>

 

And format it?  Or do I need to just write a scriptlet.

 

Thanks,

Kevin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050831/586d9ad0/attachment.htm>


More information about the opencms-dev mailing list