[opencms-dev] Manual invokation of OpenCms 404 handler

Brabenetz, Harald harald.brabenetz at bearingpointconsulting.com
Thu Aug 26 14:43:17 CEST 2010


Try this (I have not tested it :) ):

Variant 1:
        Simply throw a CmsVfsResourceNotFoundException

Variant 2:
        HttpServletResponse.setStatus(HttpServletResponse.SC_NOT_FOUND);
        HttpServletResponse.sendError(HttpServletResponse.SC_NOT_FOUND, msg);

hth,
Harald


-----Original Message-----
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Roman Uhlig
Sent: Donnerstag, 26. August 2010 13:25
To: 'opencms-dev at opencms.org'
Subject: [opencms-dev] Manual invokation of OpenCms 404 handler

I need to manually invoke the OpenCms http error status handler (i.e. 404), just like it's called when a resource doesn't exist (basically manually throwing a 404). I've been browsing through the mailing list and the API doc, but couldn't find anything pointing me in the right direction.

I'd appreciate any hints on this.

Thanks in advance,
Roman

_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev

INFONOVA GmbH
Sitz: Unterpremst?tten bei Graz
Firmenbuchgericht: Landesgericht f?r ZRS Graz
Firmenbuchnummer: FN 44354b

The information in this email is confidential and may be legally privileged. If you are not the intended recipient of this message, any review, disclosure, copying, distribution, retention, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. If you are not the intended recipient, please reply to or forward a copy of this message to the sender and delete the message, any attachments, and any copies thereof from your system.



More information about the opencms-dev mailing list