views:

18

answers:

0

I got a similar question as: http://stackoverflow.com/questions/3248814/shorten-path-of-rest-service-in-jboss-seam-application/3248902#3248902 But couldn't comment on the shipmaster answer because of my initial rep. His comment Jul 19 at 18:10 misunderstood the situation:

Faces servlet is mapped by url-pattern *.xhtml and Seam Resource Servlet is mapped to /*. The /* now gets all the url patterns, even those of *.html, because it has more priority on url-pattern matching.

What can I change on components.xml in the code (default behavior): <resteasy:application resource-path-prefix="/rest"/> and on web.xml in the code below:

<servlet-mapping> 
    <servlet-name>Seam Resource Servlet</servlet-name>
    <url-pattern>/seam/resource/*</url-pattern>
</servlet-mapping>

In a way that my RestEasy resource could be accessed by a path like /rest/<resource> instead of /seam/resource/rest/<resource> without invalidating my *.xhtml faces servlets (using his hint of change Seam Resource Servlet url-pattern to /* )?

(It is basically the unsolved question of kongo09 better detailed).