Hi Chris, Yeah, sorry for my rant :-) I hope to find some time to convert those wiki pages to ASCIIdoc in the future to keep the doc closer to the sources.
Regards, Achim sent from mobile device Am 10.08.2014 10:26 schrieb <[email protected]>: > Hi Achim, > > Thanks. I do agree with you about the value of working samples - if I have > one of those I can modify it one character at a time (;-) in the direction > of my non-working code and see where it stops working. For example if it > stops working the moment I use a urlPattern which was registered by a WAB > instead of via Whiteboard then I will know where the problem lies ... > > I feel your pain when it comes to wiki formatting - having had to use > several of these systems I have come to detest the whole race and all > their {{{stupid}}} --tagging-- [!systems]. But you do need to have a bit > of text online somehow which clearly relates the user's problem to the > samples you posted, otherwise they will never find it. Maybe in the future > Google will find this correspondence on Nabble, to the edification of > future generations. > > Best regards, > > Chris > > > Hi Chris, > > > > there are plenty of different ways on how to register a Filter. > > Take a look on all the different samples available at the Pax Web project > > [1]. > > The integration tests use those samples and can be found here [2]. > > I regard a working sample much better then a documentation that you have > > to > > adapt ever 1/2 year because the underlying documentation system changed > > the > > way they interpret the wiki style. > > Documentation is unfortunately the first to loose when you only have a > > spare amount of time. > > > > You have different ways of registering a filter, either the classical way > > via Activator and the WebContainer service (an extended HttpService) [3]. > > Or you might want to register it the Whiteboard-Extender type style [4]. > > Another way of using the Whiteboard extender mechanism is to combine it > > with blueprint. [5] > > > > > > regards, Achim > > > > [1] - https://github.com/ops4j/org.ops4j.pax.web/tree/master/samples > > [2] - > > > https://github.com/ops4j/org.ops4j.pax.web/tree/master/pax-web-itest/pax-web-itest-container/pax-web-itest-container-jetty/src/test/java/org/ops4j/pax/web/itest/jetty > > [3] - > > > https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/helloworld-wc/src/main/java/org/ops4j/pax/web/samples/helloworld/wc/internal/Activator.java#L73 > > [4] - > > > https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/whiteboard/src/main/java/org/ops4j/pax/web/extender/samples/whiteboard/internal/Activator.java#L108 > > [5] - > > > https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/whiteboard-blueprint/src/main/resources/OSGI-INF/blueprint/blueprint.xml#L67 > > > > > > > > 2014-08-09 10:27 GMT+02:00 <[email protected]>: > > > >> Talking about web services, has anyone succeeded in getting a > >> javax.servlet.Filter to work, outside of a WAB? According to the only > >> usable documentation I have found[1] the magic property is > >> "urlPatterns", > >> and indeed this causes PAX Web to stop muttering that my servlet "did > >> not > >> contain a valid alias or url patterns property" and to announce that it > >> was binding my bundle to "http service", but no joy. Even my init() > >> method > >> doesn't get called, never mind doFilter(). I've tried setting > >> urlPatterns > >> to a single String and to an array of Strings, using an exact path or a > >> wildcard ("/*") or a regexp ("/.*"), without success. > >> > >> Thanks, > >> > >> Chris > >> > >> > >> [1] > >> > https://ops4j1.jira.com/wiki/display/ops4j/Pax+Web+Extender+-+Whiteboard > >> Yes, it's from 2009; but the more recent docs are even more broken, and > >> in > >> particular the links to the examples are dead. > >> > >> > > > > > > -- > > > > 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/> > > > > Software Architect / Project Manager / Scrum Master > > > > >
