cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Lipp <>
Subject URL structure
Date Fri, 29 Jun 2012 05:54:35 GMT

I am implementing a REST service with CXF and I want to have the following URL structure:

-  dog/34
- dog/current/34
- cat/34
- index.html

So I registered CXFServlet with url-pattern /*, but provided a static-resources-list:



My service is a single class with
public class AnimalService
	public Response getCurrentBoneForDog(

The service works fine, I can reach index.html by http://server/app/index.html, but I would
also like to get it with http://server/app
I tried to provide

but this doesn't work either.

In the logs I find
o.apache.cxf.jaxrs.utils.JAXRSUtils - No operation matching request path "/app/" is found,
Relative Path: /, HTTP Method: GET, ContentType: */*

Is it able to set a "default handler", so when no operation matching request path is set then
it delegates to standard mechanism?
Is it possible to solve my requirement with CXF mechanism? The only thing I can think of is
to provide two servlet mappings with "/dog/*" and /cat/*" which would mean that I also had
to split my service class into two parts.

Kind regards,

View raw message