I’m writing a RESTful Java server with CXF framework.
How do I can write a @Path Regular Expression in order to obtain any URI finished in “/action” value?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not sure if its /action/*, /*/action, or /*/action/* you want?. Anyway here goes:
1) /action/* can be matched by
In this example, a request like GET /action/order/2/price will be served by the doStuff() method where list can be used to get to all the path segments in order/2/price captured by the regular expression.
2) /*/action can be matched by (WARNING untested)
In this example, a request like GET /item/2/action will be served by the findStuff() method where list can be used to get to all the path segments in item/2 captured by the regular expression.
3) /*/action/* Here I believe you are out of luck (feel free to correct me if I am wrong), for further info check this blog post.