Error page for errors during Script execution

32 views
Skip to first unread message

IT Tudes

unread,
Apr 4, 2012, 9:07:06 AM4/4/12
to Jease - The Java CMS with Ease
Hi,
following the documentation about error management :
http://www.jease.org/documentation/error
everything works fine for standard http error like 404.
I'm still facing a problem when an exception is thrown during Script
execution.
In the above case I'm getting the exception message / trace, unless
I'm catching and managing the exception within the script code.

How shall I redirect script errors to a generic error page?

Thanks!
Alessandro

Maik Jablonski

unread,
Apr 4, 2012, 3:20:34 PM4/4/12
to je...@googlegroups.com
Hi Alessandro,

you'll need to add an additional error handler to web.xml. Something
like this should do the trick:

...
<error-page>
<error-code>500</error-code>
<location>/site/service/Error.jsp</location>
</error-page>
...

If this works for you, I'm going to checkin this addition into the trunk.

Cheers, Maik

IT Tudes

unread,
Apr 4, 2012, 3:55:47 PM4/4/12
to Jease - The Java CMS with Ease
Hi Maik,

>         <error-page>
>                 <error-code>500</error-code>
>                 <location>/site/service/Error.jsp</location>
>         </error-page>
> ...
>
> If this works for you, I'm going to checkin this addition into the trunk.


It works fine. Thanks a lot!

Cheers,
Alessandro

On Apr 4, 9:20 pm, Maik Jablonski <maik.jablon...@gmail.com> wrote:
> Hi Alessandro,
>
> On Wed, Apr 4, 2012 at 15:07, IT Tudes <it.tu...@gmail.com> wrote:
> > following the documentation about error management :
> >http://www.jease.org/documentation/error
> > everything works fine for standard http error like 404.
> > I'm still facing a problem when an exception is thrown during Script
> > execution.
> > In the above case I'm getting the exception message / trace, unless
> > I'm catching and managing the exception within the script code.
>
> > How shall I redirect script errors to a generic error page?
>
> you'll need to add an additional error handler to web.xml. Something
> like this should do the trick:
>
> ...
>
> Cheers, Maik
Reply all
Reply to author
Forward
0 new messages