When an exception occurs, either a http 404 not found response is sent
(when the action isn't found), or a http 500 internal server error
response is sent  (both using http headers).  For 500 errors, the
exception is also stored in the the request scope, according to the
servlet and jsp specs, to allow :

A) either a JSP error page (with the error page directive) to be created
to access the page scoped variable "exception", or
B) a custom view page that has access to the request.getAttribute(name)
to get the exception itself, using the key
javax.servlet.error.exception.. i.e.
request.getAttribute("javax.servlet.error.exception")



> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Jason Carreira
> Sent: Tuesday, 7 October 2003 10:51 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [OS-webwork] handling NPEs in an action
> 
> 
> You could just set up a error page in your web.xml... Then 
> you get your pretty error page for all errors, not just 
> errors inside Actions...
> 
> > -----Original Message-----
> > From: Francisco Hernandez [mailto:[EMAIL PROTECTED]
> > Sent: Monday, October 06, 2003 8:44 PM
> > To: [EMAIL PROTECTED]
> > Subject: [OS-webwork] handling NPEs in an action
> > 
> > 
> > what do you guys think about returning a result like
> > invalid.action.result or something along those lines when 
> the action 
> > executed throws NPE? this way I can just map an global-result 
> > to show a 
> > pretty screen to the users
> > 
> > currently if an action throws NPE i get 500 Internal Server Error
> > 
> > 
> > 
> > 
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > Opensymphony-webwork mailing list 
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> > 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to