title: REST add subresources
body: <p>studying REST I stumbled into sub-resources and I did some experiments, but no success. Here is the code, I'm using RESTeasy 3.0.9.</p>
  
  <pre><code>@Path(value="/user")
  public interface UsersHttp {
  
      @GET
      @Produces(MediaType.APPLICATION_JSON)
      public User[] getUsers();
  
      @GET
      @Path("/{id}")
      @Produces(MediaType.APPLICATION_JSON)
      public User getUser(@PathParam("id") Long id);
      ...
  }
  </code></pre>
  
  <p>this interface is implemented by this session-bean:</p>
  
  <pre><code>@Stateless
  public class UsersHttpImpl implements UsersHttp {
  
      @Inject
      private UserPersistence persist;
      @Inject
      private MediaUtils mediaUtils;
  
      @Override
      public User[] getUsers() {
          return persist.getUsers(null);
      }
  
      @Override
      public User getUser(Long id) {
          return persist.getUser(id);
      }
      ...
  }
  </code></pre>
  
  <p>This is a snippet of the <code>User</code> class:</p>
  
  <pre><code>@SuppressWarnings("serial")
  @Entity
  @Table(name = "usr_user")
  @XmlRootElement
  public class User implements Serializable {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      @Column(name = "usr_id")
      private Long id;
  
      @Column(name = "usr_name", nullable = false)
      private String name;
  
      ...
  
      public Long getId() {
          return id;
      }
  
      public void setId(Long id) {
          this.id = id;
      }
  
      @Path("/name")
      public String getName() {
          return name;
      }
      ...
  }
  </code></pre>
  
  <p>I can successfully get a <code>User</code> by <code>MyApplication/user/1</code>, but when I do <code>GET</code> with <code>MyApplication/user/1/name</code> I get a <code>javax.ws.rs.NotFoundException</code>, I was expecting <code>Alice</code> instead. What did I miss?</p>