JBoss7.1中Vaadin应用程序的自定义404500错误页面

JBoss7.1中Vaadin应用程序的自定义404500错误页面,jboss,http-status-code-404,vaadin,jboss7.x,custom-error-pages,Jboss,Http Status Code 404,Vaadin,Jboss7.x,Custom Error Pages,我正在JBoss7.1中运行一个vaadin应用程序。无论何时出现异常或错误状态,例如404或500,都会显示JBoss的默认错误页面。我想显示一个自定义错误页面,其中包含错误代码和异常的堆栈跟踪,而不是默认的JBoss错误页面。有谁能告诉我如何实现这一点吗 提前感谢。在Vaadin中,您可以添加注释WebServlet,如下所示: @WebServlet(value = "/*", asyncSupported = true) 和(在不同的UI上) 所有不一致的url(如yourwebsit

我正在JBoss7.1中运行一个vaadin应用程序。无论何时出现异常或错误状态,例如404或500,都会显示JBoss的默认错误页面。我想显示一个自定义错误页面,其中包含错误代码和异常的堆栈跟踪,而不是默认的JBoss错误页面。有谁能告诉我如何实现这一点吗


提前感谢。

在Vaadin中,您可以添加注释
WebServlet
,如下所示:

@WebServlet(value = "/*", asyncSupported = true)
和(在不同的UI上)

所有不一致的url(如yourwebsite.com/login)都转到默认页面

在JBoss中,您可以添加以下内容:

<error-page>
   <error-code>404</error-code>
   <location>/Error404.html</location>
</error-page>

404
/Error404.html
<error-page>
   <error-code>404</error-code>
   <location>/Error404.html</location>
</error-page>