Hi, hmm ... you're right according to the spec, 140.6 Registering Resources, it should be a pattern, therefore a /* should be trailing it. could you open a bug for this? (if you need a Jira-User I'll create one) regarding your second question, I'm not sure it's Object only cause in the pax-web sample we don't set it only to Object [1].
regards, Achim [1] - https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/whiteboard-ds/src/main/java/org/ops4j/pax/web/samples/whiteboard/ds/WhiteboardResource.java#L23 2017-04-13 23:19 GMT+02:00 Peter Schyma <[email protected]>: > Hi, > > thank you. > > I wonder whether the resource pattern is correct. I was following the > example from RFC 189 that uses the trailing /* on a class extending > HttpServlet without defining any explicit service type (and thus resulting > in Servlet). But this service registration was not recongized by the > whiteboard. After some googling I found an example that declared the > service type as Object and now it was recognized and registered but not > accessible due to the trailing /*. > > This yields two questions: > 1. Shouldn't the pattern without the trailing /* match only the /web > folder (as an absolute resource mapping)? > 2. Why do I have to use Object as service type even though the RFC states > "The service type can be any type, it is adviced to use the implementation > class as the type."? > > Greetings, > Peter > > Am Donnerstag, 13. April 2017 21:48:09 UTC+2 schrieb Achim Nierbeck: >> >> Hi Peter, >> >> I provided a pull request. >> The issue is actually a wrong resource.pattern, it needs to be only >> /resource without the trailing /* >> after that the resources did work correctly. >> >> Regarding PAXWEB-1077 it's still open and will take a bit. >> It's especially annoying as an update or restart of such a bundle doesn't >> work. >> >> regards, Achim >> > -- > -- > ------------------ > OPS4J - http://www.ops4j.org - [email protected] > > --- > You received this message because you are subscribed to the Google Groups > "OPS4J" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Apache Member Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead blog <http://notizblog.nierbeck.de/> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> Software Architect / Project Manager / Scrum Master -- -- ------------------ OPS4J - http://www.ops4j.org - [email protected] --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
