[opencms-dev] Can we add the HTTP Last-Modified attribute?

Stephan Hartmann hartmann at waehrisch-feykes.de
Tue Jun 11 12:12:27 CEST 2002


Hello,

i think you could easyly do this by adding this before the return of method 
getContent of the Class com.opencms.template.CmsXmlTemplate:

String requestUri = cms.getRequestContext().getUri();
long lDate = cms.readFileHeader(requestUri).getDateLastModified();
cms.getRequestContext().getResponse().setLastModified(lDate);


i don't know if it will work so let me know it.

Bye,
Stephan









Am Freitag,  7. Juni 2002 16:15 schrieben Sie:

> > System Configuration:
>
>     OpenCMS:           4.6.1
>     Mandrake Linux: 2.4.18-6mdk
>     Tomcat:                4.0.3
>     JDK:                     1.3.1 (for compiling)
>                                   1.4.0 (for JRE)
>
> I have a need to display the modification date of displayed resources as
> part of the frametemplate.  OpenCMS 4.6.1 does not set the HTTP header
> attribute "Last-Modified:date".  Does anyone have the code change that
> will set this attribute?  Since this is probably a common need, surely
> someone has done this before.
>
> Thanks!

----------------------------------------
Content-Type: text/html; charset="us-ascii"; name="Anhang: 1"
Content-Transfer-Encoding: 7bit
Content-Description: 
----------------------------------------

-- 
Stephan Hartmann

Währisch & Feykes GmbH
Gustav-Adolf-Str. 5
47057 Duisburg
Tel. 0203 / 373 070
Fax 0203 / 376 766
hartmann at wfnetz.de

------------------------------------------------------
Ausschlusserklärung (Disclaimer):
Über das Internet versandte E-mails können unter fremden Namen erstellt oder 
manipuliert werden. Aus diesem Grund enthalten unsere mit E-mail verschickten 
Nachrichten grundsätzlich keine rechtsverbindlichen Willenserklärungen.



More information about the opencms-dev mailing list