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>