[opencms-dev] cms:contentload and expired objects

Marcel Kessler marcel.kessler at netcetera.ch
Mon Jun 15 12:00:20 CEST 2009


hi

we have the following situation:
in a jsp-page, we display an object that expires at some time.
after the object expired, we get the 404 page, as obviously the object
cannot be found anymore, see also log:

SEVERE: Servlet.service() for servlet jsp threw exception
org.opencms.file.CmsVfsResourceNotFoundException: Resource
"/de/_configuration/context-objects/context-object
-items/context-object-aktuell2.html" was not found.
        at
org.opencms.db.CmsSecurityManager.checkPermissions(CmsSecurityManager.java
:5400)
        at
org.opencms.db.CmsSecurityManager.checkPermissions(CmsSecurityManager.java
:5375)
        at
org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:580
1)
        at
org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:398
7)
        at org.opencms.file.CmsObject.readResource(CmsObject.java:3470)
        at org.opencms.file.CmsObject.readFile(CmsObject.java:2772)
        at org.opencms.file.CmsObject.readFile(CmsObject.java:2743)
        at
org.opencms.file.collectors.CmsDefaultResourceCollector.getSingleFile(CmsD
efaultResourceCollector.
java:338)
        at
org.opencms.file.collectors.CmsDefaultResourceCollector.getResults(CmsDefa
ultResourceCollector.jav
a:174)
        at
org.opencms.jsp.CmsJspTagContentLoad.init(CmsJspTagContentLoad.java:867)
        at
org.opencms.jsp.CmsJspTagContentLoad.doStartTag(CmsJspTagContentLoad.java:
369)
        at
org.apache.jsp.WEB_002dINF.jsp.online.system.modules.ch_xxx_site.elements.
context_005fob
ject_jsp._jspx_meth_cms_005fcontentload_005f0(context_005fobject_jsp.java:
122)
        at
org.apache.jsp.WEB_002dINF.jsp.online.system.modules.ch_xxx_site.elements.
context_005fob
ject_jsp._jspService(context_005fobject_jsp.java:93)

my question:
is there a way to check within the jsp if the object I want to load
exists, before we load it and get this exception?

thanks for an answer
marcel



More information about the opencms-dev mailing list