To develop a web application in the Equinox environment, you must use the functions provided by some toolkit to achieve the interconnection of resources between the Web server and the Equinox environment.
Equinox provides the org. Eclipse. Equinox. http. helper package to register the web application content in the form of bundle in the Equinox environment to the web server. The content covers all Java Servlet specifications, including servlet, filter, and listener. We can also integrate the traditional Java technical framework spring + Struts + hibernate + acegi into the Equinox environment and continue to exert their advantages. At the same time, the existing traditional Java technical framework development projects and products are encapsulated, dynamically deployed, and run in the Equinox environment.
The Org. Eclipse. Equinox. http. helper package provides six classes:
Resourceservlet. Java
Bundleentryhttpcontext. Java
Contextinitparametersservletadaptor. Java
Contextlistenerservletadaptor. Java
Contextpathservletadaptor. Java
Filterservletadaptor. Java
In addition, equinox provides the httpservice interface in the org. osgi. Service. http package. This interface defines two methods to register bundle resources with the Web server.
SubsequentArticleThe usage and instances of the classes mentioned above are explained one by one.