Thanks for the update Charles ;) I'm with the customer without all my code :/
Regards JB -----Original Message----- From: Charles Moulliard <[email protected]> Date: Tue, 15 Feb 2011 10:51:54 To: <[email protected]>; <[email protected]> Subject: Re: Two issues when getting http to work Remark: extender is part of the WAR feature and not http <feature name="http" version="2.1.99-SNAPSHOT" resolver="(obr)"> <configfile finalname="/etc/jetty.xml">mvn:org.apache.karaf/apache-karaf/2.1.99-SNAPSHOT/xml/jettyconfig</configfile> <config name="org.ops4j.pax.web"> org.osgi.service.http.port=8181 javax.servlet.context.tempdir=${karaf.data}/pax-web-jsp org.ops4j.pax.web.config.file=${karaf.base}/etc/jetty.xml </config> <feature version="[7.0,8.0)">jetty</feature> <bundle>mvn:org.ops4j.pax.web/pax-web-api/1.0.0-SNAPSHOT</bundle> <bundle>mvn:org.ops4j.pax.web/pax-web-spi/1.0.0-SNAPSHOT</bundle> <bundle>mvn:org.ops4j.pax.web/pax-web-runtime/1.0.0-SNAPSHOT</bundle> <bundle>mvn:org.ops4j.pax.web/pax-web-jetty/1.0.0-SNAPSHOT</bundle> </feature> <feature name="war" version="2.1.99-SNAPSHOT" resolver="(obr)"> <config name="org.ops4j.pax.url.war"> org.ops4j.pax.url.war.importPaxLoggingPackages=true </config> <feature>http</feature> <bundle start-level='30'>mvn:org.apache.karaf.shell/org.apache.karaf.shell.web/2.1.99-SNAPSHOT</bundle> <bundle>mvn:org.ops4j.pax.web/pax-web-jsp/1.0.0-SNAPSHOT</bundle> <bundle>mvn:org.ops4j.pax.web/pax-web-extender-war/1.0.0-SNAPSHOT</bundle> <bundle>mvn:org.ops4j.pax.web/pax-web-extender-whiteboard/1.0.0-SNAPSHOT</bundle> <bundle>mvn:org.ops4j.pax.web/pax-web-deployer/1.0.0-SNAPSHOT</bundle> <bundle>mvn:org.ops4j.pax.url/pax-url-war/1.2.4</bundle> </feature> On Tue, Feb 15, 2011 at 10:43 AM, <[email protected]> wrote: > Hi Christian, > > Two points: > 1/ the http feature should push the configuration file. The features > descriptor supports the <file/> element. For example, we use it in ActiveMQ > to push the broker blueprint xml. Anyway the configuration file could be in > the standard distribution but not on the minimal one. > 2/ we have two ways for the Pax Web Extender: we add it in the http feature > or we add a http-extender feature including the http one + the pax web > extender. Honestly, I think it could be added to the http one. > > Regards > JB > ------Original Message------ > From: Christian Schneider > To: [email protected] > ReplyTo: [email protected] > Subject: Two issues when getting http to work > Sent: Feb 15, 2011 10:29 > > Hi Karaf Team, > > I have struggled a bit to create a small example project for Karaf. > There are two problems that hit me and that I think could be improved. > I wanted to register a simple servlet so it can be reached on > http://localhost:8080/test > > The first thing was that the http service did not run on any port after > installation of the http feature "features:install http". > Luckily I recently worked on a karaf distribution for Talend so in the > end I was able to peek there and find that the "org.ops4j.pax.web.cfg" > file was missing. > After copying the file and setting the port number it worked. > > Then I wanted to install the HttpServlet using the whiteboard pattern. I > found that CXF does this for the http transport but it did not work for me. > This took me a bit longer. Evenutally I found that installing the pax > web whiteboard extender did the job: > install mvn:org.ops4j.pax.web/pax-web-extender-whiteboard/0.7.4 > > So my proposal is to include the config file "org.ops4j.pax.web.cfg" > with a port set to 8080 in the karaf distro. The file does not hurt and > will not open a port > till the http feature is installed. Besides hat I propose to include the > pax web whiteboard extender in the http feature as I think registering > servlets with the > whiteboard pattern is a very good practice. > > What do you think? > > Christian > > -- > ---- > http://www.liquid-reality.de > >
