Absolute path used in contacts.jsp of resteasy-springMVC example:
Line 15 of contacts.jsp: <form action="/contacts" method="post">
This will make the example always post request to top level uri: http://<hostname>/contacts
But when the example is deployed in application, such as JBoss, it will serve at relative path: http://<hostname>/resteasy-springMVC/contacts.
Which will cost a 404 error.
Remove the slash in form action will eliminate the problem: <form action="contacts" method="post">