You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Rice Yeh <ri...@gmail.com> on 2010/07/07 05:25:51 UTC

2 resource classes with the same @Path but providing different media types inside

Hi,
  Is it supported by jaxrs to allow 2 top-level classes with same @Path
setting but produce different content type. For example, 2 classes C0 and C1
have @Path("p") and both of them have a method called m1. But the C0.m1()
method produces json content. C1.m2() method produces html content. Will cxf
correctly call the right method by the requested content type? And more,
what if C1 extends C0? That is, C1 extends C0's supported content type.

Regards,
Rice