[opencms-dev] Accessing file creation/modification date inside JSP-(Template)

M Butcher mbutcher at grcomputing.net
Thu Aug 7 19:21:00 CEST 2003


>From a CmsJspActionElement cms, you can get DateLastModified by doing
this:


cms.getCmsObject().readFile(filename).getDateLastModified();

You can get the filename from 

String filename =
cms.getRequestContext().getRequest().getRequestedResource();

though there are probably other ways of doing that.

Matt

On Fri, 2003-08-01 at 06:10, Jörn Wohlrab wrote:
> Ok, but how would the coding inside the JSP look like?
> Could it be like ...
> <%
>   CmsJspActionElement cms = new CmsJspActionElement(pageContext, 
> request, response);
>   cms.getCmsObject().???(??).getDateLastModified();
> <%>
> Thank you for your fast response!
> -- Joern
> 
> Thomas März schrieb:
> 
> >Hello,
> >
> >Jörn Wohlrab <jwohlrab at unilog.de> writes:
> >  
> >
> >>is it possible to access the the creation and the modification
> >>date/time of a page via JSP-Tag or JSP-scriptlet? We just want to add
> >>    
> >>
> >
> >Yes, com.opencms.file.CmsResource.getDateLastModified().
> >
> >Best Regards,
> >Thomas Maerz
> >
> >_______________________________________________
> >This mail is send to you from the opencms-dev mailing list
> >To change your list options, or to unsubscribe from the list, please visit
> >http://mail.opencms.org/mailman/listinfo/opencms-dev
> >
> >  
> >
> 
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
-- 
M Butcher <mbutcher at grcomputing.net>



More information about the opencms-dev mailing list