portals-jetspeed-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emandi, Srinivasrao" <srinivas.ema...@logicacmg.com>
Subject RE: Re: How to handle exception ????
Date Mon, 09 Jan 2006 14:00:47 GMT
Than Q .....

-----Original Message-----
From: news [mailto:news@sea.gmane.org]On Behalf Of Aaron Evans
Sent: Monday, January 09, 2006 6:47 PM
To: jetspeed-user@jakarta.apache.org
Subject: Re: How to handle exception ????


Emandi, Srinivasrao <srinivas.emandi <at> logicacmg.com> writes:

> 
> Hi all
> 	Can any one say , how to handle exception in portlet. Is there is any concept
of configuring an error page in
> portlet.xml as if it was done in web.xml.
> 	If any runtime excetion occurs i want to forward to error page, how to handle
this...
> Thanks in advance...

I do not believe that there is any error page configuration for portlet in the 
portlet.xml like there is for servlets in web.xml.

Remember that you don't have control over certain aspects of the http response 
as this is the reponsibility of the portlet container/portal itself as it 
presents an aggregated view of many portlets.  So it would not make sense to 
base it on http error codes like in the servlet web.xml because the portal
is going to return 200, even if your portlet has an error.

I guess the question becomes, does J2 have any features for configuring
some kind of error display for exceptions generated by individual portlets.

In any event, if you are developing your own portlets, my suggestion would be
this:

In your doView, doEdit, doHelp methods, wrap everything in a try/catch block,
and then in the catch, do an include of an error JSP page in your application.







---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org



This e-mail and any attachment is for authorised use by the intended recipient(s) only. It
may contain proprietary material, confidential information and/or be subject to legal privilege.
It should not be copied, disclosed to, retained or used by, any other party. If you are not
an intended recipient then please promptly delete this e-mail and any attachment and all copies
and inform the sender. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Mime
View raw message