I don’t see any Http Service whiteboard properties on the Servlet component. How are you registering it with the Servlet container?
Tim Sent from my iPhone > On 6 Aug 2018, at 16:22, Nhut Thai Le via osgi-dev <[email protected]> > wrote: > > Hello, > > I have a servlet defined like this: > > @Component(service = Servlet.class) > public class HelloWorld extends HttpServlet { > @Reference(cardinality = ReferenceCardinality.MANDATORY) > private AdminBroker adminBroker; > > protected void doGet(HttpServletRequest request, HttpServletResponse > response) throws ServletException, IOException { > adminBroker.doSomething(); > } > } > > My AdminBroker implementation looks like: > @Component(service=AdminBroker.class) > public class AdminBrokerImpl implements AdminBroker { > @Activate > private void init() { > String param1 = "some text"; > } > } > > When I started the env (felix 6 with pax-web), I can see the AdminBroker > instantiated (hit a break point in the init of my AdminBroker implementation) > but when the web request arrives and the doGet method is called, the > adminBroker is null. > > Does anyone have an idea what may go wrong here? > > Thai Le > > -- > Castor Technologies Inc > 460 rue St-Catherine St Ouest, Suite 613 > Montréal, Québec H3B-1A7 > (514) 360-7208 o > (514) 798-2044 f > [email protected] > www.castortech.com > > CONFIDENTIALITY NOTICE: The information contained in this e-mail is > confidential and may be proprietary information intended only for the use of > the individual or entity to whom it is addressed. If the reader of this > message is not the intended recipient, you are hereby notified that any > viewing, dissemination, distribution, disclosure, copy or use of the > information contained in this e-mail message is strictly prohibited. If you > have received and/or are viewing this e-mail in error, please immediately > notify the sender by reply e-mail, and delete it from your system without > reading, forwarding, copying or saving in any manner. Thank you. > AVIS DE CONFIDENTIALITE: L’information contenue dans ce message est > confidentiel, peut être protégé par le secret professionnel et est réservé à > l'usage exclusif du destinataire. Toute autre personne est par les présentes > avisée qu'il lui est strictement interdit de diffuser, distribuer ou > reproduire ce message. Si vous avez reçu cette communication par erreur, > veuillez la détruire immédiatement et en aviser l'expéditeur. Merci. > _______________________________________________ > OSGi Developer Mail List > [email protected] > https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
