<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
.ExternalClass EC_p.MsoNormal, .ExternalClass EC_li.MsoNormal, .ExternalClass EC_div.MsoNormal
{margin-bottom:.0001pt;font-size:12.0pt;font-family:'Times New Roman';}
.ExternalClass a:link, .ExternalClass EC_span.MsoHyperlink
{color:blue;text-decoration:underline;}
.ExternalClass a:visited, .ExternalClass EC_span.MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
.ExternalClass EC_span.EmailStyle17
{font-family:Arial;color:windowtext;font-weight:normal;font-style:normal;text-decoration:none none;}
.ExternalClass EC_div.Section1
{page:Section1;}
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman";}
pre
{margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:Arial;
color:blue;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>Sweet, I had to do it a little different,
might be different versions, I’m on 7.0.3<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>org.opencms.flex.CmsFlexController
controller = org.opencms.flex.CmsFlexController.getController(request);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>org.opencms.file.CmsObject object =
controller.getCmsObject();<o:p></o:p></span></font></p>
<p class=MsoNormal><b><font size=2 color=blue face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:blue;font-weight:bold'>org.opencms.file.CmsResource
resource = object.readResource(object.getRequestContext().getUri());<o:p></o:p></span></font></b></p>
<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>java.util.Date date = new
java.util.Date(resource.getDateContent());<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>I had tried something similar earlier, the
line in bold is where I was going wrong.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=blue face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:blue'>Thank you very much!!<br>
<br>
Nick<o:p></o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> opencms-dev-bounces@opencms.org
[mailto:opencms-dev-bounces@opencms.org] <b><span style='font-weight:bold'>On
Behalf Of </span></b>karl adenener<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, January 09, 2008
12:30 AM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">The
OpenCms mailing list</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [opencms-dev] Get
Content's Last Modified Date</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'><br>
Hi Nick, <br>
<br>
you know this?<br>
<br>
CmsTemplateModules cms = new CmsTemplateModules(pageContext,
request, response);<br>
CmsObject cmso = cms.getCmsObject();<br>
CmsResource cmsr = cmso.readResource( uri );<br>
CmsFile file
= new CmsFile(
cmsr ); // or Ressource or Folder<br>
file.getDateContent() // Returns the date of the last modification of the
content of this resource.<br>
<br>
For me it is working fine.<br>
<br>
<st1:City w:st="on"><st1:place w:st="on">Aden</st1:place></st1:City><o:p></o:p></span></font></p>
<div class=MsoNormal align=center style='text-align:center'><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
<hr size=2 width="100%" align=center>
</span></font></div>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>Date: Tue, 8 Jan 2008 12:05:31
-0600<br>
From: ndesteffen@tlcontact.com<br>
To: opencms-dev@opencms.org<br>
Subject: [opencms-dev] Get Content's Last Modified Date<o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi,<br>
I’m trying to get the date that a page was last modified. When I use the
following code in a .jsp the date that is returned is the modified date of the
template. Any ideas on how to get at the content’s date? It has to
be available as its listed in the workspace.</span></font><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'><o:p></o:p></span></font></p>
<p class=MsoNormal><b><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial;font-weight:bold'>org.opencms.flex.CmsFlexController
controller = org.opencms.flex.CmsFlexController.getController(request);</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'><o:p></o:p></span></font></p>
<p class=MsoNormal><b><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial;font-weight:bold'>java.util.Date expired = new
java.util.Date(controller.getDateLastModified());</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Thanks!</span></font><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Nick DeSteffen</span></font><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Web Developer - CarePages Inc.</span></font><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><a href="http://www.carepages.com" target="_blank">http://www.carepages.com</a></span></font><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><a href="mailto:ndesteffen@tlcontact.com">ndesteffen@tlcontact.com</a></span></font><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font><font size=2 face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font><font size=2 face=Tahoma><span style='font-size:
10.0pt;font-family:Tahoma'><o:p></o:p></span></font></p>
</div>
<pre><font size=2 face="Courier New"><span style='font-size:10.0pt'>----<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'><o:p> </o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>Harness the compassion to help when someone needs<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>you. We're excited to announce 'We Carry Each<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>Other,' a collection of inspiring stories and<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>practical tips on how to cope and care from Eric<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>and Sharon Langshur, the founders of CarePages.<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>Look at your local major bookseller or visit<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>http://www.carepages.com/we_carry.jsp<o:p></o:p></span></font></pre>
<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'><o:p> </o:p></span></font></p>
<div class=MsoNormal align=center style='text-align:center'><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
<hr size=2 width="100%" align=center>
</span></font></div>
<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>Kostenlos bloggen + eigene Homepage + Fotospeicher = MSN
Spaces <a href="http://clk.atdmt.com/GBL/go/mcrsddsp0020000048gbl/direct/01/"
target="_new">Hier klicken! </a><o:p></o:p></span></font></p>
</div>
<PRE>
----
Harness the compassion to help when someone needs
you. We're excited to announce 'We Carry Each
Other,' a collection of inspiring stories and
practical tips on how to cope and care from Eric
and Sharon Langshur, the founders of CarePages.
Look at your local major bookseller or visit
http://www.carepages.com/we_carry.jsp</PRE></body>
</html>