开发者

Handle PortletException in JSR-168

How can I catch and handle开发者_StackOverflow社区 the PortletException thrown by GenericPortlet.doView()? I'd like to show a custom error page or custom message in JBoss portal if this exception is thrown for some reason.


The Portlet 2.0 spec (JSR 286 - but I doubt they took out error handling) says:

It is left to the portal/portlet-container implementation how to react when a portlet throws an exception while processing a request. For example, the portal/portlet-container could render an error page instead of the portal page, render an error message in the portlet 25 window of the portlet that threw the exception or remove the portlet from the portal page and log an error message for the administrator.

JBoss Portal's error handling doesn't seem to offer what you want.

You'll probably have to handle this yourself, perhaps by defining an abstract base class that your other portlets can extend.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜