I've just brought over a jsp application from Tomcat 4.1.31 to JBoss 4.0.2. Everything looks okay except the custom 404 page. The 404 page (/resources/error404.jsp) displays as expected, but it says something like:
The page you requested http://myserver/resources/error404.jsp could not be found.
The page you requested http://myserver/something_nonexistent.jsp could not be found.
The above renders from the following:
The page you requested <i><%= request.getRequestURL().toString() %> could not be found.
<error-page> <error-code>404</error-code> <location>/resources/error404.jsp</location> </error-page>
Also look at all request attributes on 404 page, it is worth.