문제

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