3 Replies Latest reply on Sep 27, 2010 4:10 PM by fei0x

    SpringDM Web + Pax Web

    vector_jdev.work

      I see Pax Web preinstalled in fuse. It means we have webcontainer(Jetty) + web extender + jsp support out of the box in Fuse.

       

      But if I use Spring DM, and want to deploy web application that uses SpringDM can I use these preinstalled web support or I still need to install SpringDM web extender+it's dependency packages?

        • 1. Re: SpringDM Web + Pax Web
          socallag

          Hi,

           

          It is possible you may need to install the Spring DM extender as it may be required to intervene in order to get the spring application context it creates into the webapp.

           

          Regards,

           

          Seán.

          • 2. Re: SpringDM Web + Pax Web
            socallag

            Hi,

             

            Some additional information:

             

            Yes you can deploy war to ServiceMix 4 without any additional bundles.  FUSE uses the PAX web extender which does mostly the same thing as Spring-DM web extender so there is no need to deploy the Spring web extender unless you want to use specific features of it.  The web feature is installed by default so they should be able to use a command similar to "install war:file:///home/user/tmp

            /test.war?Webapp-Context=myapp".  This is outlined in the tutorial below as well.

             

            There is a small tutorial here:  http://servicemix.apache.org/SMX4KNL/how-to-transform-your-smk-kernel-into-a-web-application-server-.html

             

            Regards,

             

            Seán

            • 3. Re: SpringDM Web + Pax Web
              fei0x

              Hi,

              I know I'm bringing up an old thread, but it is very relevant. I am trying to install the Spring DM web extender myself but it doesn't seem to be invoking when i install the war to servicemix. (My war is named *.war and has a WEB-INF directory)

               

              In addition I'd like to keep Pax Web running, just incase the cxf module that uses it wont work on Spring's Tomcat. However I can't deploy our apps to Pax Web because it doesn't support taglibs " ... to see the result of invoking a jsp that uses taglibs.  not yet implemented" http://wiki.ops4j.org/display/paxweb/Examples

               

              Could someone provide some insight on getting the Spring DM web-extender to work in servicemix4 (4.2.0-fuse-02-00)? Or even let me know if this should even work?

               

              I've read the documentation here: http://static.springsource.org/osgi/docs/current/reference/html/web.html  as a guideline for preparing the environment.

               

              The following is what I've done in attempt to get Tomcat installed and running in ServiceMix using Spring.

               

              1) I've created a Web Server Fragment which has the following host in the manifest

               

               

              <Fragment-Host>org.springframework.osgi.web.extender</Fragment-Host>

              and has a file META-INF/spring/extender/tomcat-deployer.xml containing

                   <?xml version="1.0" encoding="UTF-8"?>
                    <beans xmlns="http://www.springframework.org/schema/beans"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:schemaLocation="http://www.springframework.org/schema/beans
                    http://www.springframework.org/schema/beans/spring-beans.xsd">
                    <bean id="warDeployer" class="org.springframework.osgi.web.deployer.tomcat.TomcatWarDeployer" />
                    </beans>

              This fragment resolves and attaches itself to bundle 'Apache Tomcat Catalina' correctly.

               

              2) I've also created a Catalina Config Fragment that I cannot get to resolve. It's Fragment Host is:

              <Fragment-Host>org.springframework.osgi.catalina.start.osgi</Fragment-Host>

              but I'm unsure which bundle is supposed to export this, as none of my bundles do. It contains a conf/server.xml configuration file which is mostly a copy of a generic windows install of tomcat 6 server.xml

               

              3) To resolve the web extender, tomcat and to prepare bunldes for my web-app I have also installed the following features. (note: I had to uninstall 'Pax Web - Jsp Support' in order to get the web-dependencies working) :

              Another Note: these depend on each other in order, so you must install them in the order listed here.

               

                   <feature name="spring-dependencies" version="1.0.0">
                    <bundle>mvn:org.osgi/org.osgi.compendium/4.1.0</bundle>
                    <bundle>mvn:javax.el/com.springsource.javax.el/1.0.0</bundle>
                    <bundle>mvn:javax.xml.ws/com.springsource.javax.xml.ws/2.1.1</bundle>
                    <bundle>mvn:javax.xml.stream/com.springsource.javax.xml.stream/1.0.1</bundle>
                    <bundle>mvn:javax.xml.rpc/com.springsource.javax.xml.rpc/1.1.0</bundle>
                    <bundle>mvn:javax.xml.soap/com.springsource.javax.xml.soap/1.3.0</bundle>
                    <bundle>mvn:javax.persistence/com.springsource.javax.persistence/1.99.0</bundle>
                    <bundle>mvn:org.aspectj/com.springsource.org.aspectj.tools/1.6.8.RELEASE</bundle>
                    <bundle>mvn:org.apache.commons/com.springsource.org.apache.commons.logging/1.1.1</bundle>
                    <bundle>mvn:org.apache.commons/com.springsource.org.apache.commons.lang/2.4.0</bundle>
                    <bundle>mvn:org.apache.xmlcommons/com.springsource.org.apache.xmlcommons/1.3.4</bundle>
                    <bundle>mvn:org.jboss.el/com.springsource.org.jboss.el/2.0.0.GA</bundle>
                    <bundle>mvn:org.jboss.javassist/com.springsource.javassist/3.9.0.GA</bundle>
                    <bundle>mvn:org.aopalliance/com.springsource.org.aopalliance/1.0.0</bundle>
                    </feature>
                    <feature name="spring" version="1.0.0">
                    <bundle>mvn:org.springframework.osgi/org.springframework.osgi.web/1.2.0</bundle>
                    <bundle>mvn:org.springframework.osgi/org.springframework.osgi.web.extender/1.2.0</bundle>
                    </feature>
                    <feature name="tomcat" version="1.0.0">
                    <bundle>mvn:javax.ejb/com.springsource.javax.ejb/3.0.0</bundle>
                    <bundle>mvn:javax.activation/com.springsource.javax.activation/1.1.1</bundle>
                    <bundle>mvn:javax.mail/com.springsource.javax.mail/1.4.1</bundle>
                    <bundle>mvn:org.apache.coyote/com.springsource.org.apache.coyote/6.0.24</bundle>
                    <bundle>mvn:org.apache.juli/com.springsource.org.apache.juli.extras/6.0.24</bundle>
                    <bundle>mvn:org.apache.catalina/com.springsource.org.apache.catalina/6.0.24</bundle>
                    <bundle>mvn:org.springframework/org.springframework.instrument.tomcat/3.0.4.RELEASE</bundle>
                    </feature>
                    <feature name="web-dependencies" version="1.0.0">
                    <bundle>mvn:javax.servlet/com.springsource.javax.servlet/2.5.0</bundle>
                    <bundle>mvn:javax.servlet/com.springsource.javax.servlet.jsp/2.1.0</bundle>
                    <bundle>mvn:javax.servlet/com.springsource.javax.servlet.jsp.jstl/1.2.0</bundle>
                    <bundle>mvn:javax.faces/com.springsource.javax.faces/1.2.0.09</bundle>
                    <!bundle>mvn:javax.portlet/com.springsource.javax.portlet/2.0.0</bundle>
                    <bundle>mvn:org.springframework/org.springframework.web/2.5.6.SEC01</bundle>
                    <bundle>mvn:org.springframework/org.springframework.web.servlet/2.5.6.SEC01</bundle>
                    <bundle>mvn:org.springframework/org.springframework.web.portlet/2.5.6.SEC01</bundle>
                    <bundle>mvn:org.springframework.webflow/org.springframework.binding/2.0.9.RELEASE</bundle>
                    <bundle>mvn:org.springframework.webflow/org.springframework.js/2.0.9.RELEASE</bundle>
                    <bundle>mvn:org.springframework.webflow/org.springframework.webflow/2.0.9.RELEASE</bundle>
                    <bundle>mvn:org.springframework.webflow/org.springframework.faces/2.0.9.RELEASE</bundle>
                    <bundle>mvn:com.sun.facelets/com.springsource.com.sun.facelets/1.1.14</bundle>
                    </feature>

              Any help is appreciated, as this has been a blocker for some time now.

              Thanks,

              Jeremy

               

              Edited by: fei0x on Sep 27, 2010 8:09 PM