I want to configure a error page that is shown if a certain exception occurs in Axon.ivy. How can I do that?

asked 09.01.2015 at 08:33

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
accept rate: 74%

You can configure error pages in the web.xml located in folder /webapps/ivy/WEB-INF. Add the following configuration:

< error-page >
    < exception-type >java.lang.Throwable< exception-type >
    < location >/myErrorPage.xhtml< location >
< error-page >

Replace java.lang.Throwable with the exception class for which you want to have a special error page.

Another possiblity is to use the normal error page already configured (e.g. ivy-error-page.xhtml) and change it so that it displays different messages for different exception types. In the error page you have access to the errorPage variable that is of type ch.ivyteam.ivy.webserver.ErrorPageMBean. The errorPage variable provides access to the exception object that causes the error handling. With this information you can switch the error page output depending on the exception type.

More information about error page and error handling can be found here.


answered 09.01.2015 at 08:53

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
accept rate: 74%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 09.01.2015 at 08:33

Seen: 2,740 times

Last updated: 09.01.2015 at 08:53