tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastian Daschner (JIRA)" <>
Subject [jira] [Created] (TOMEE-1535) JAX-RS Subresource paths are chosen incorrectly
Date Sun, 29 Mar 2015 08:34:52 GMT
Sebastian Daschner created TOMEE-1535:

             Summary: JAX-RS Subresource paths are chosen incorrectly
                 Key: TOMEE-1535
             Project: TomEE
          Issue Type: Bug
    Affects Versions: 2.0.0
            Reporter: Sebastian Daschner

When using a JAX-RS root resource with a subresource, the path of the subresources are evaluated
in a wrong way.
Consider following code:

public class RootResource {

    ResourceContext resourceContext;

    public String getRoot() {
        return "root";

    public ModelsResource models() {
        return resourceContext.getResource(ModelsResource.class);



public class ModelsResource {

    public String getAll() {
        return "all";

    public String get(@PathParam("id") final String id) {
        return "model_" + id;

The paths of the resources which TomEE evaluates are:
/resources/       ->      String getRoot()
/resources/       ->      String getAll()           
/resources/{id}   ->      String get(String)

But the correct way due to the spec would be
/resources/models/ -> getAll() and
/resources/models/{id} -> get(String).

This message was sent by Atlassian JIRA

View raw message