[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [equinox-dev] server side osgi/equinox with JSP

Hi Kevin,
 
The OSGi HttpService provides support for "servlets" and static "resources" but not JSP -- at least out of the box (more on this at the bottom of this message). Equinox has a few HttpService implementations that apply at different times:
1)  org.eclipse.equinox.http
This implementation is small and has very few dependencies. The trade-off, is that it's limited to Servlet API 2.1 support.
 
Requires the following bundles:
org.eclipse.osgi (comes with the SDK)
org.eclipse.osgi.services (comes with the SDK)
org.eclipse.equinox.http
javax.servlet
 
2) org.eclipse.equinox.http.jetty
This implementation embeds Jetty and uses it to provide the Servlet API support for the HttpService. It provides Servlet 2.4 support but has more dependencies and subsequently requires more bundles. Based on your comments I'd suggest using this implementation for your development.
 
Requires the following bundles:
org.eclipse.osgi (comes with the SDK)
org.eclipse.osgi.services (comes with the SDK)
org.eclipse.equinox.http.jetty
org.eclipse.equinox.http.servlet
javax.servlet
org.mortbay.jetty
org.apache.commons.logging
 
3) org.eclipse.equinox.http.servletbridge
This implementation lets you embed Equinox on an existing appserver (e.g. Tomcat, Websphere, Weblogic, etc.) and then uses it to provide the HttpService implementation. It provides Servlet API support that matches whatever level the appserver provides.
 
Requires the following bundles:
org.eclipse.osgi (comes with the SDK)
org.eclipse.osgi.services (comes with the SDK)
org.eclipse.equinox.servletbridge
org.eclipse.equinox.http.servletbridge
org.eclipse.equinox.http.servlet
javax.servlet (required only at dev time; at runtime the appserver provides the servlet api)
 
All of the additional bundles are available from the Equinox downloads. ( http://download.eclipse.org/eclipse/equinox/ ).
Note: This work is being carried out on 3.3 code stream although it is compatible with 3.2.x. The bundles for (2) and (3) are available in 3.3M3 or any integration build after I20061010-0800.
-
Again, depending on your circumstances you should be able to use one of these HttpService implementations. They're supported and ready for use.
I'd suggest starting here -- http://www.eclipse.org/equinox/documents/http_quickstart.php
 
-----
For JSP...
Technically, we've had JSP 2.0 support for OSGi based web applications for sometime. (See https://bugs.eclipse.org/bugs/show_bug.cgi?id=140430 )
What's missing is some organization around the work. As I recall the JSP support in Wolfgang's article at Infonoia used pre-compiled JSPs. The equinox JSP work is a little different and supports on-the-fly compilation and is OSGi aware in terms of resolving dependencies. I'm preparing a bit of documentation on the JSP support right now and will add it to the equinox web-site in the next few days. I'll add a note on the JSP bug when it's been added.
 
For timing, the JSP work itself is quite small and has been stable for a few months now. I'm hopeful that we'll be able to graduate these components before the end of this year. I'm hoping to target 3.3M4 -- but we'll see.
 
Hope this helps,
Simon

From: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of qujianjun
Sent: Monday, October 16, 2006 5:17 AM
To: equinox-dev@xxxxxxxxxxx
Subject: [equinox-dev] server side osgi/equinox with JSP

Hi,all,

    I'am studied osgi and equinox for several weeks and very interesting in it. This week when I try to apply the equinox to a web application , I encountered great difficult in adding JSPs into the application, I readed "Server-Side Equinox" and "Infonoia solution", still can't find a transparent way to do it conveniently. Does anybody succeed in it, or has a better way? Ideally, I would like to embed the app server into equinox as a bundle, and register the jsp to it just as HttpService for the htmls and servlets.
    We are going to develop a web based product, and I am really abstracted by the idea of osgi, but afte some test, I think the osgi solutions are still immature in server side. I wonder if the equinox team has the plan to developing such kind of bundles or has any practicality plan in the near future to push forward the osgi standard and equinox into the server side area.


Kevin




--火爆数码全场低价!
--http://sms.eyou.com
--无忧二二族、足球大富翁...尽在亿邮短信
 
     This message may contain privileged and/or confidential information.  If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so.  Thank you.