I have a embedded Jetty server(currently using 8.1.16) where I'm deploying multiple resources whose resource path is as below :
1) /users (path spec : /users) 2)/users/{id} (path spec : /users/*)
The context path is set as (/). If I add the servlet for the wildcard first (i.e /users/*) and then /users everything seems to work fine. I can access the resources successfully at /users and /users/<>.
However if the order in which the servlets are added to the ServletContextHandler is reversed, I can only access the path with wildcard (i.e /users/*) and I get 404 on /users. Is this expected? How can I access both the resources even when the order is reversed? Has anyone ever come across such issue?
Thanks in advance.