The first step is to build an OSGI environment;
Open Eclipse, click run-"Run Configration:, configure as follows, click Run."
The result of the operation is as follows: The OSGi environment is built.
Step two: Build an OSGi-based Web development environment
Two ways: The first, tick the required bundle, list as
Second, tick the box below and click Add Required bundles, as
Click Run, the results are as follows:
Web Access, displaying the following information to show that OSGi's web environment has been built.
Step three: Write a simple Web service validation result (for example, a dictionary query)
Create a new Dictquery plug-in project that provides the interface for dictionary queries, as shown in
Export the interface package
Fourth step: Create a new local dictionary plug-in project and add dependencies
Fifth step: Add a remote dictionary and add dependent
Sixth step: Create a new HTTP plug-in project.
Create a new servlet
Modify Startup
Create a new HTML file
Run the result as shown in
Source of the entire project: http://yunpan.cn/cHNEAKPYmH7pp access password d74f
OSGi's web development environment builds