Hi, Gemini Web will initialize ServletContainerInitializer placed in WEB-INF/lib/*.jar or placed in a bundle that is required by web app bundle i.e import-packages or require-bundle.
Or you can use JarScannerCustomizer - here [1] you can find an example. You can use one of these three methods depending on the scenario. Regards, Violeta [1] http://git.eclipse.org/c/gemini.web/org.eclipse.gemini.web.gemini-web-container.git/tree/test-bundles/customizer-bundle http://git.eclipse.org/c/gemini.web/org.eclipse.gemini.web.gemini-web-container.git/tree/org.eclipse.gemini.web.test/src/test/java/org/eclipse/gemini/web/test/tomcat/TomcatServletContainerTests.java -> testCustomizers() 2014-07-10 17:41 GMT+03:00 huangdenghui <[email protected]>: > Hi Violeta > Thanks for your quickly reply. Yes, i already download felix and > Gemini web bundles, then start felix with > "java -jar bin/felix.jar", all Gemini web bundles start successfully. > > Let's firstly describe what i am done, then describe what problem i > met, I have several bundles to provide web service, just like hosttracker > module from opendaylight, please refer > https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=tree;f=opendaylight/northbound/hosttracker;hb=eee61ea351b6179d2862dce6875bdc25dd0fb272, > it has a web.xml to describe this web application's attribute, such as > servlet class, please refer hosttracker's web.xml > https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=tree;f=opendaylight/northbound/hosttracker/src/main/resources/WEB-INF;h=b42ae8116d116e38e6cf44eaffda6daeeba3b97c;hb=eee61ea351b6179d2862dce6875bdc25dd0fb272 > > Now, coming to my problem, > > after start gemini web, when web application bundled get start, gemini web > will found it is web application, it will try to allocate one context > container for it, this is my understanding, if it is wrong, please correct > me, > > my error log is > > can't find JAR for some web application URL ServletContainerInitializer > > so because this error, gemini web mark that web application unavailable. > > Then i follow this article > <http://stackoverflow.com/questions/10776599/servletcontainerinitializer-vs-servletcontextlistener> > http://stackoverflow.com/questions/10776599/servletcontainerinitializer-vs-servletcontextlistener > > to custom my servletcontainerinitializer, but still it doesn't work, > > also i read tomcat source code, there is some code section to check > whether the servletcontainerinitializer existed? > > > but technically, the ServletContainerInitializer > <http://download.oracle.com/javaee/6/api/javax/servlet/ServletContainerInitializer.html> > is not a listener – it is an initializer and it’s executed *before* any > servlet context will even be ready. You can use this initializer to do some > programatic servlet/filters/listeners addition, > > So, is there any configuration option to make gemini web not to check it. > > > ------------------------------ > Date: Wed, 9 Jul 2014 21:31:08 +0300 > From: [email protected] > To: [email protected] > Subject: Re: [gemini-dev] Need help for gemini web. > > > Hi, > > Just download felix [1], then extract its archive and put all 34 Gemini > Web bundles in the "bundle" directory. > Then start felix with "java -jar bin/felix.jar". > That's all. > > Regards > Violeta > > [1] http://felix.apache.org/downloads.cgi -> Felix Framework Distribution > > > > > 2014-07-09 19:01 GMT+03:00 huangdenghui <[email protected]>: > > > > Hi team, > > > > > > I want to use gemini web to implement web application in OSGI > environment to support northbound API in one SDN controller, just like > opendaylight project does, but i use different OSGI container from > opendaylight, my project is based on felix, opendaylight is based on > equinox. So is there any docs about how to configure gemini web in felix > OSGI environment? Yes, i check user guide, but it don't provide very > detailed information for how to configure it. > > > > --denghui > > > > > > _______________________________________________ > > gemini-dev mailing list > > [email protected] > > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > > https://dev.eclipse.org/mailman/listinfo/gemini-dev > > _______________________________________________ gemini-dev mailing list > [email protected] To change your delivery options, retrieve your > password, or unsubscribe from this list, visit > https://dev.eclipse.org/mailman/listinfo/gemini-dev > > _______________________________________________ > gemini-dev mailing list > [email protected] > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/gemini-dev >
_______________________________________________ gemini-dev mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/gemini-dev
