Thank you, Oscar, I understand now. I've written CustomErrorResolution which extends ErrorResolution, adds message as a equest parameter and call ErrorResolution's execute() method. Works very well.
Lukas Oscar Westra van Holthe - Kind wrote: > > On 24-04-2009 at 15:00, esemba wrote: >> >> Thanks Aaron, >> sou you are suggesting to implement custom error resolution, which will >> add >> an error message as request parameter? > > Note that in case of exceptions causing a 500 error page, there is a > standard > JSP variable called "exception" that has the exception. If handled by the > container, it's also accessible as PageContext.getException() -- maybe > it's > accessible too when you add a resuest attribute "exception" yourself, but > I > really don't know. > > So you can add your own attribute. In that case a custom error resolution > is > best IMHO, because the message is consistently added to the same request > attribute (people tend to forget sometimes). > > You can also force your message to go through the standard mechanism, by > throwing an (uncaught) exception. The error page then displays the > exception's message. > > Your choice will be between speed and convenience: > - the custom error resolution is likely faster > - if all uncaught exceptions have their message shown, you don't have to > catch them all > > > Oscar > > -- > ,-_ Oscar Westra van holthe - Kind http://www.xs4all.nl/~kindop/ > /() ) > (__ ( The haves and the have-nots can often be traced back to the > =/ () dids and the did-nots. > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > Stripes-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/stripes-users > > -- View this message in context: http://www.nabble.com/Reading-ErrorResolution-message-in-jsp-tp23224772p23230248.html Sent from the stripes-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
