Web application development based on spring DM

Source: Internet
Author: User
Tags log4j

The biggest feature of the Spring DM 1.1.x is that it can support the deployment of Web applications in which it is a cool feature and I even feel that developing an OSGi Web application in this way is better than using the spring DM server, At least for now you can get better portability (which can run on multiple OSGI platforms supported by the spring DM), and the spring DM server does not provide more enterprise application support.

But for those of you who just used the spring DM for Web application development, it's not easy to configure successfully. The following detailed explanation of the relevant configuration.

1 bundles required to run the environment:

0 ACTIVE system.bundle_3.2.2.r32x_v20070118


1 ACTIVE com.springsource.slf4j.api_1.5.0


2 resolved org.springframework.osgi.jetty.web.extender.fragment.osgi_1.0.0


master=46


3 ACTIVE org.springframework.bundle.osgi.extender_1.0.1.v200803070100


4 ACTIVE org.springframework.bundle.spring.core_2.5.5


5 ACTIVE org.springframework.bundle.spring.web_2.5.5


6 ACTIVE com.springsource.org.objectweb.asm_2.2.3


7 resolved osgi_log_config_1.0.0


master=36


8 ACTIVE org.springframework.bundle.osgi.core_1.0.1.v200803070100


9 ACTIVE com.springsource.slf4j.log4j_1.5.0


ACTIVE org.springframework.bundle.spring_2.5.2.v200803070100


ACTIVE org.springframework.bundle.spring.context_2.5.5


ACTIVE javax.servlet_2.4.0.v200706111738


ACTIVE Org.springframework.osgi.servlet-api.osgi_2.5.0.snapshot


ACTIVE com.springsource.net.sf.cglib_2.1.3


ACTIVE org.springframework.bundle.spring.beans_2.5.5


ACTIVE javax.servlet.jsp_2.0.0.v200706191603


ACTIVE org.springframework.osgi.jetty.start.osgi_1.0.0


ACTIVE org.springframework.bundle.osgi.io_1.0.1.v200803070100


ACTIVE org.aopalliance_1.0.0


ACTIVE org.springframework.bundle.spring.context.support_2.5.5


ACTIVE com.springsource.org.aopalliance_1.0.0


ACTIVE org.springframework.bundle.spring.aop_2.5.5


ACTIVE com.springsource.slf4j.org.apache.commons.logging_1.5.0


ACTIVE org.objectweb.asm_2.2.3


ACTIVE org.mortbay.jetty.server_6.1.9


ACTIVE org.mortbay.jetty.util_6.1.9


ACTIVE Org.springframework.osgi.log4j.osgi_1.2.15.snapshot


fragments=7


Notoginseng ACTIVE org.mortbay.jetty_5.1.11.v200706111724


ACTIVE org.springframework.bundle.osgi.extender_1.1.2


ACTIVE org.springframework.bundle.osgi.io_1.1.2


ACTIVE org.springframework.bundle.osgi.web_1.1.2



ACTIVE org.springframework.bundle.osgi.web.extender_1.1.2

fragments=2


ACTIVE org.springframework.bundle.osgi.core_1.1.2

These bundles can be found in the Spring DM 1.1.2 Release package, where the start level of the above bundles is set to 2.

2 Add log4j Log configuration Bundles

The purpose of this bundles is to provide log4j.properties, and the detailed approach can refer to my "Spring OSGi QuickStart"

3 Developing Web applications

Web applications are developed in much the same way as a typical web, just adding some osgi configurations.

The approximate structure is as follows:

META-INF
   MANIFEST.MF
   WEB-INF
   Classes
   Lib
   Web.xml
   applicationContext.xml

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.