Hi yes but no :p
in details: we deploy classes with only method @Path (no class @path) as endpoint by default (ie you use scanning) cause users do it (comes from spring I think). Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-10-29 14:09 GMT+01:00 Alex Soto <[email protected]>: > Hi guys, > Currently I am developing some jax-rs endpoints with Apache TomEE 1.7.1. I > am trying to develop some subresources, but there is something that > confuses me: > > Reading some documentation in summary says that your subresource should not > be annotated with @Path annotation and they gives you next example: > > // Subresource class > public class Employee { > > // Subresource method: returns the employee's last name > @GET > @Path("/lastname") > public String getEmployeeLastName() { > ... > return lastName > } > } > > In theory it should be a subresource, but when I deploy this in TomEE I can > access to this subresource directly from path provided in each method (in > previous case localhost:8080/app/lastname), but my question is that if it > is a subresource, it should not be accessed directly from browser but from > another resource right? So for example it should be valid accessing from > localhost:8080/app/employee/lastname > > You can see the example here > http://docs.oracle.com/javaee/6/tutorial/doc/gknav.html > > Alex. > > > > -- > +----------------------------------------------------------+ > Alex Soto Bueno > www.lordofthejars.com > +----------------------------------------------------------+
