Вопрос

I am running a vaadin application in JBoss 7.1. Whenever there is a exception or error status such as 404 or 500, the default error page of JBoss is displayed. I would like to display a custom error page with the error code and the stack trace of the exception in it instead of the default JBoss error page. Can anyone tell me how to implement this?

Thanks in advance.

Это было полезно?

Решение

In Vaadin you can add annotation WebServlet like that:

@WebServlet(value = "/*", asyncSupported = true)

and (on a different UI)

@WebServlet(value = "/home/*", asyncSupported = true)

All inesistent url like yourwebsite.com/login go to default page

In JBoss you can add in WEB-INF/web.xml this:

<error-page>
   <error-code>404</error-code>
   <location>/Error404.html</location>
</error-page>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top