You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by ld...@apache.org on 2012/02/01 13:59:33 UTC

svn commit: r1239115 - in /karaf/webconsole/trunk: ./ web/ web/src/ web/src/main/ web/src/main/java/ web/src/main/java/org/ web/src/main/java/org/apache/ web/src/main/java/org/apache/karaf/ web/src/main/java/org/apache/karaf/webconsole/ web/src/main/ja...

Author: ldywicki
Date: Wed Feb  1 12:59:32 2012
New Revision: 1239115

URL: http://svn.apache.org/viewvc?rev=1239115&view=rev
Log:
Added war distribution of webconsole. It requires correct set up of jaas realm in container.

Signed-off-by: Lukasz Dywicki <lu...@code-house.org>

Added:
    karaf/webconsole/trunk/web/
    karaf/webconsole/trunk/web/pom.xml
    karaf/webconsole/trunk/web/src/
    karaf/webconsole/trunk/web/src/main/
    karaf/webconsole/trunk/web/src/main/java/
    karaf/webconsole/trunk/web/src/main/java/org/
    karaf/webconsole/trunk/web/src/main/java/org/apache/
    karaf/webconsole/trunk/web/src/main/java/org/apache/karaf/
    karaf/webconsole/trunk/web/src/main/java/org/apache/karaf/webconsole/
    karaf/webconsole/trunk/web/src/main/java/org/apache/karaf/webconsole/web/
    karaf/webconsole/trunk/web/src/main/java/org/apache/karaf/webconsole/web/FrameworkService.java
    karaf/webconsole/trunk/web/src/main/java/org/apache/karaf/webconsole/web/ProvisionActivator.java
    karaf/webconsole/trunk/web/src/main/java/org/apache/karaf/webconsole/web/StartupListener.java
    karaf/webconsole/trunk/web/src/main/resources/
    karaf/webconsole/trunk/web/src/main/resources/framework.properties
    karaf/webconsole/trunk/web/src/main/webapp/
    karaf/webconsole/trunk/web/src/main/webapp/WEB-INF/
    karaf/webconsole/trunk/web/src/main/webapp/WEB-INF/web.xml
Modified:
    karaf/webconsole/trunk/pom.xml

Modified: karaf/webconsole/trunk/pom.xml
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/pom.xml?rev=1239115&r1=1239114&r2=1239115&view=diff
==============================================================================
--- karaf/webconsole/trunk/pom.xml (original)
+++ karaf/webconsole/trunk/pom.xml Wed Feb  1 12:59:32 2012
@@ -48,6 +48,7 @@
         <module>servicemix</module>
         <module>camel</module>
         <module>cxf</module>
+        <module>war</module>
 
         <module>examples</module>
         <module>manual</module>

Added: karaf/webconsole/trunk/web/pom.xml
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/web/pom.xml?rev=1239115&view=auto
==============================================================================
--- karaf/webconsole/trunk/web/pom.xml (added)
+++ karaf/webconsole/trunk/web/pom.xml Wed Feb  1 12:59:32 2012
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
+    license agreements. See the NOTICE file distributed with this work for additional 
+    information regarding copyright ownership. The ASF licenses this file to 
+    You under the Apache License, Version 2.0 (the "License"); you may not use 
+    this file except in compliance with the License. You may obtain a copy of 
+    the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
+    by applicable law or agreed to in writing, software distributed under the 
+    License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
+    OF ANY KIND, either express or implied. See the License for the specific 
+    language governing permissions and limitations under the License. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.karaf</groupId>
+        <artifactId>webconsole</artifactId>
+        <version>0.3.0-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.karaf.webconsole</groupId>
+    <artifactId>org.apache.karaf.webconsole.web</artifactId>
+    <name>Apache Karaf :: WebConsole :: Web Support</name>
+    <packaging>war</packaging>
+
+    <properties>
+        <bundlesDirectory>${project.build.directory}/bundles</bundlesDirectory>
+        <slf4j.version>1.6.1</slf4j.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.karaf.webconsole</groupId>
+            <artifactId>org.apache.karaf.webconsole.core</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.http.bridge</artifactId>
+            <version>2.2.0</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.framework</artifactId>
+            <version>4.0.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.http.proxy</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.ops4j.pax.wicket</groupId>
+            <artifactId>pax-wicket-service</artifactId>
+            <version>0.8.0-SNAPSHOT</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.logging</groupId>
+            <artifactId>pax-logging-api</artifactId>
+            <version>1.6.4</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.logging</groupId>
+            <artifactId>pax-logging-service</artifactId>
+            <version>1.6.4</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.configadmin</artifactId>
+            <version>1.2.8</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.prefs</artifactId>
+            <version>1.0.4</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.aries.proxy</groupId>
+            <artifactId>org.apache.aries.proxy.impl</artifactId>
+            <version>0.3</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>${slf4j.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-bundles</id>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <excludeGroupIds>org.apache.wicket,org.springframework.osgi,aopalliance,commons-logging,org.apache.geronimo.specs,org.osgi,org.apache.aries.testsupport</excludeGroupIds>
+                    <excludeArtifactIds>servlet-api,org.apache.felix.http.api,org.apache.felix.http.base,org.apache.karaf.util,org.osgi.core,javax.servlet,org.osgi.foundation,log4j,commons-codec</excludeArtifactIds>
+                    <includeScope>provided</includeScope>
+                    <outputDirectory>${bundlesDirectory}</outputDirectory>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <configuration>
+                    <packagingExcludes>WEB-INF/servlet-api*.jar,WEB-INF/org.osgi.core-*.jar</packagingExcludes>
+                    <webResources>
+                        <resource>
+                            <directory>${bundlesDirectory}</directory>
+                            <targetPath>WEB-INF/bundles</targetPath>
+                        </resource>
+                    </webResources>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.mortbay.jetty</groupId>
+                <artifactId>jetty-maven-plugin</artifactId>
+                <version>7.5.4.v20111024</version>
+                <configuration>
+                    <scanIntervalSeconds>10</scanIntervalSeconds>
+                    <webAppConfig>
+                        <contextPath>/</contextPath>
+                    </webAppConfig>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Added: karaf/webconsole/trunk/web/src/main/java/org/apache/karaf/webconsole/web/FrameworkService.java
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/web/src/main/java/org/apache/karaf/webconsole/web/FrameworkService.java?rev=1239115&view=auto
==============================================================================
--- karaf/webconsole/trunk/web/src/main/java/org/apache/karaf/webconsole/web/FrameworkService.java (added)
+++ karaf/webconsole/trunk/web/src/main/java/org/apache/karaf/webconsole/web/FrameworkService.java Wed Feb  1 12:59:32 2012
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.karaf.webconsole.web;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.servlet.ServletContext;
+
+import org.apache.felix.framework.Felix;
+import org.apache.felix.framework.util.FelixConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public final class FrameworkService {
+    private Logger logger = LoggerFactory.getLogger(FrameworkService.class);
+
+    private final ServletContext context;
+    private Felix felix;
+
+    public FrameworkService(ServletContext context) {
+        this.context = context;
+    }
+
+    public void start() {
+        try {
+            doStart();
+        } catch (Exception e) {
+            logger.error("Failed to start framework", e);
+        }
+    }
+
+    public void stop() {
+        try {
+            doStop();
+        } catch (Exception e) {
+            logger.error("Error stopping framework", e);
+        }
+    }
+
+    private void doStart() throws Exception {
+        Felix tmp = new Felix(createConfig());
+        tmp.start();
+        this.felix = tmp;
+        logger.info("OSGi framework started");
+    }
+
+    private void doStop() throws Exception {
+        if (this.felix != null) {
+            this.felix.stop();
+        }
+
+        logger.info("OSGi framework stopped");
+    }
+
+    private Map<String, Object> createConfig() throws Exception {
+        Properties props = new Properties();
+        props.load(getClass().getResourceAsStream("/framework.properties"));
+
+        HashMap<String, Object> map = new HashMap<String, Object>();
+        for (Object key : props.keySet()) {
+            map.put(key.toString(), props.get(key));
+        }
+
+        map.put(FelixConstants.SYSTEMBUNDLE_ACTIVATORS_PROP, Arrays.asList(new ProvisionActivator(this.context)));
+        return map;
+    }
+
+}
\ No newline at end of file

Added: karaf/webconsole/trunk/web/src/main/java/org/apache/karaf/webconsole/web/ProvisionActivator.java
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/web/src/main/java/org/apache/karaf/webconsole/web/ProvisionActivator.java?rev=1239115&view=auto
==============================================================================
--- karaf/webconsole/trunk/web/src/main/java/org/apache/karaf/webconsole/web/ProvisionActivator.java (added)
+++ karaf/webconsole/trunk/web/src/main/java/org/apache/karaf/webconsole/web/ProvisionActivator.java Wed Feb  1 12:59:32 2012
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.karaf.webconsole.web;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.ServletContext;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public final class ProvisionActivator implements BundleActivator {
+
+    private final ServletContext servletContext;
+
+    public ProvisionActivator(ServletContext servletContext) {
+        this.servletContext = servletContext;
+    }
+
+    public void start(BundleContext context) throws Exception {
+        servletContext.setAttribute(BundleContext.class.getName(), context);
+
+        ArrayList<Bundle> installed = new ArrayList<Bundle>();
+        for (URL url : findBundles()) {
+            Bundle bundle = context.installBundle(url.toExternalForm());
+            installed.add(bundle);
+            System.out.println("Installed " + bundle.getSymbolicName() + " " + url);
+        }
+
+        for (Bundle bundle : installed) {
+            bundle.start();
+        }
+    }
+
+    public void stop(BundleContext context) throws Exception {
+    }
+
+    private List<URL> findBundles() throws Exception {
+        List<URL> list = new ArrayList<URL>();
+
+        for (Object element : this.servletContext.getResourcePaths("/WEB-INF/bundles/")) {
+            String name = (String) element;
+            if (name.endsWith(".jar")) {
+                URL url = this.servletContext.getResource(name);
+                if (url != null) {
+                    list.add(url);
+                }
+            }
+        }
+
+        return list;
+    }
+}
\ No newline at end of file

Added: karaf/webconsole/trunk/web/src/main/java/org/apache/karaf/webconsole/web/StartupListener.java
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/web/src/main/java/org/apache/karaf/webconsole/web/StartupListener.java?rev=1239115&view=auto
==============================================================================
--- karaf/webconsole/trunk/web/src/main/java/org/apache/karaf/webconsole/web/StartupListener.java (added)
+++ karaf/webconsole/trunk/web/src/main/java/org/apache/karaf/webconsole/web/StartupListener.java Wed Feb  1 12:59:32 2012
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.karaf.webconsole.web;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+public final class StartupListener implements ServletContextListener {
+    private FrameworkService service;
+
+    public void contextInitialized(ServletContextEvent event) {
+        this.service = new FrameworkService(event.getServletContext());
+        this.service.start();
+    }
+
+    public void contextDestroyed(ServletContextEvent event) {
+        this.service.stop();
+    }
+
+}
\ No newline at end of file

Added: karaf/webconsole/trunk/web/src/main/resources/framework.properties
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/web/src/main/resources/framework.properties?rev=1239115&view=auto
==============================================================================
--- karaf/webconsole/trunk/web/src/main/resources/framework.properties (added)
+++ karaf/webconsole/trunk/web/src/main/resources/framework.properties Wed Feb  1 12:59:32 2012
@@ -0,0 +1,154 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#
+org.osgi.framework.storage=target/cache
+
+org.osgi.framework.storage.clean = onFirstInit
+
+# remember to load servlet api from parent class loader not from bundle!
+org.osgi.framework.system.packages= \
+ org.osgi.framework; version=1.5.0, \
+ org.osgi.framework.launch; version=1.0.0, \
+ org.osgi.framework.hooks.service; version=1.0.0, \
+ org.osgi.service.packageadmin; version=1.2.0, \
+ org.osgi.service.startlevel; version=1.1.0, \
+ org.osgi.service.url; version=1.0.0, \
+ org.osgi.util.tracker; version=1.4.0, \
+ javax.servlet;javax.servlet.http;version=2.5, \
+ javax.accessibility, \
+ javax.activity, \
+ javax.crypto, \
+ javax.crypto.interfaces, \
+ javax.crypto.spec, \
+ javax.imageio, \
+ javax.imageio.event, \
+ javax.imageio.metadata, \
+ javax.imageio.plugins.bmp, \
+ javax.imageio.plugins.jpeg, \
+ javax.imageio.spi, \
+ javax.imageio.stream, \
+ javax.management, \
+ javax.management.loading, \
+ javax.management.modelmbean, \
+ javax.management.monitor, \
+ javax.management.openmbean, \
+ javax.management.relation, \
+ javax.management.remote, \
+ javax.management.remote.rmi, \
+ javax.management.timer, \
+ javax.naming, \
+ javax.naming.directory, \
+ javax.naming.event, \
+ javax.naming.ldap, \
+ javax.naming.spi, \
+ javax.net, \
+ javax.net.ssl, \
+ javax.print, \
+ javax.print.attribute, \
+ javax.print.attribute.standard, \
+ javax.print.event, \
+ javax.rmi, \
+ javax.rmi.CORBA, \
+ javax.rmi.ssl, \
+ javax.security.auth, \
+ javax.security.auth.callback, \
+ javax.security.auth.kerberos, \
+ javax.security.auth.login, \
+ javax.security.auth.spi, \
+ javax.security.auth.x500, \
+ javax.security.cert, \
+ javax.security.sasl, \
+ javax.sound.midi, \
+ javax.sound.midi.spi, \
+ javax.sound.sampled, \
+ javax.sound.sampled.spi, \
+ javax.sql, \
+ javax.sql.rowset, \
+ javax.sql.rowset.serial, \
+ javax.sql.rowset.spi, \
+ javax.swing, \
+ javax.swing.border, \
+ javax.swing.colorchooser, \
+ javax.swing.event, \
+ javax.swing.filechooser, \
+ javax.swing.plaf, \
+ javax.swing.plaf.basic, \
+ javax.swing.plaf.metal, \
+ javax.swing.plaf.multi, \
+ javax.swing.plaf.synth, \
+ javax.swing.table, \
+ javax.swing.text, \
+ javax.swing.text.html, \
+ javax.swing.text.html.parser, \
+ javax.swing.text.rtf, \
+ javax.swing.tree, \
+ javax.swing.undo, \
+ javax.transaction; javax.transaction.xa; partial=true; mandatory:=partial, \
+ javax.xml, \
+ javax.xml.datatype, \
+ javax.xml.namespace, \
+ javax.xml.parsers, \
+ javax.xml.transform, \
+ javax.xml.transform.dom, \
+ javax.xml.transform.sax, \
+ javax.xml.transform.stream, \
+ javax.xml.validation, \
+ javax.xml.xpath, \
+ org.ietf.jgss, \
+ org.omg.CORBA, \
+ org.omg.CORBA_2_3, \
+ org.omg.CORBA_2_3.portable, \
+ org.omg.CORBA.DynAnyPackage, \
+ org.omg.CORBA.ORBPackage, \
+ org.omg.CORBA.portable, \
+ org.omg.CORBA.TypeCodePackage, \
+ org.omg.CosNaming, \
+ org.omg.CosNaming.NamingContextExtPackage, \
+ org.omg.CosNaming.NamingContextPackage, \
+ org.omg.Dynamic, \
+ org.omg.DynamicAny, \
+ org.omg.DynamicAny.DynAnyFactoryPackage, \
+ org.omg.DynamicAny.DynAnyPackage, \
+ org.omg.IOP, \
+ org.omg.IOP.CodecFactoryPackage, \
+ org.omg.IOP.CodecPackage, \
+ org.omg.Messaging, \
+ org.omg.PortableInterceptor, \
+ org.omg.PortableInterceptor.ORBInitInfoPackage, \
+ org.omg.PortableServer, \
+ org.omg.PortableServer.CurrentPackage, \
+ org.omg.PortableServer.POAManagerPackage, \
+ org.omg.PortableServer.POAPackage, \
+ org.omg.PortableServer.portable, \
+ org.omg.PortableServer.ServantLocatorPackage, \
+ org.omg.SendingContext, \
+ org.omg.stub.java.rmi, \
+ org.omg.stub.javax.management.remote.rmi, \
+ org.w3c.dom, \
+ org.w3c.dom.bootstrap, \
+ org.w3c.dom.css, \
+ org.w3c.dom.events, \
+ org.w3c.dom.html, \
+ org.w3c.dom.ls, \
+ org.w3c.dom.ranges, \
+ org.w3c.dom.stylesheets, \
+ org.w3c.dom.traversal, \
+ org.w3c.dom.views, \
+ org.xml.sax, \
+ org.xml.sax.ext, \
+ org.xml.sax.helpers

Added: karaf/webconsole/trunk/web/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/web/src/main/webapp/WEB-INF/web.xml?rev=1239115&view=auto
==============================================================================
--- karaf/webconsole/trunk/web/src/main/webapp/WEB-INF/web.xml (added)
+++ karaf/webconsole/trunk/web/src/main/webapp/WEB-INF/web.xml Wed Feb  1 12:59:32 2012
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.5"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="
+        http://java.sun.com/xml/ns/javaee
+        http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
+    ">
+
+    <display-name>Karaf WebConsole</display-name>
+
+    <listener>
+        <listener-class>org.apache.karaf.webconsole.web.StartupListener</listener-class>
+    </listener>
+
+    <listener>
+        <listener-class>org.apache.felix.http.proxy.ProxyListener</listener-class>
+    </listener>
+
+    <servlet>
+        <servlet-name>proxy</servlet-name>
+        <servlet-class>org.apache.felix.http.proxy.ProxyServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>proxy</servlet-name>
+        <url-pattern>/*</url-pattern>
+    </servlet-mapping>
+
+</web-app>
\ No newline at end of file