WEM 8.5 - How to send an error while executing a content component's display view jsp

Hi Experts,
I'm just curious about the error handling in a JSP (display view):
Usually, you can force an error page by invoking something like:
${pageContext.response.sendError(404)}
In WEM it does not work (or at least it does not work for me).
Do you know how to handle this correctly?
At a certain condition in a display view, I would like to abort the execution and send an error to the client.
The WEM error handling seems to isolate errors within it's content components. How can I force an all-embracing error and abort execution to show a 404 status code (for example)?
Thanks,
Sagar Sunkar.
Comments
-
WEM has its own component model. Thus when you are dealing with HTTP request object in a component or region scope you are dealing with is not original HttpRequest object for the servlet. Thus operation like what you mentioned will not work, the idea of a component framework is compartmentalize errors so they error do not impact the full page rendering.
one way to do what you want is to write out a JavaScript on the page with redirect logic.
0
Categories
- All Categories
- 124 Developer Announcements
- 54 Articles
- 156 General Questions
- 155 Thrust Services
- 56 Developer Hackathon
- 38 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9.1K Extended ECM
- 920 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 35 eDOCS
- 195 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 11 XM Fax
- Follow Categories