|
Re: Eqinox HttpService only supports servlet 2.1 specification. [message #890437 is a reply to message #889880] |
Fri, 22 June 2012 09:47 |
|
Unfortunately, OSGi specification itself requires servlet 2.1 only. From
your equinox.http.*.jar version I assume you have Equinox shipped with
Eclipse 3.7 Indigo. This version support only 2.1 or 2.5 if you use
Jetty-backed version (but it uses not supported too old version of Jetty
so I've never used it).
Me personally, I had to just deal with it. And rewrite my servlet app to
use 2.1 API only.
However, there are project trying to overcome this like Pax Web. Again,
I've never use it.
New Equinox 3.8 that is in release-candidate testing will offer servlet
3.0 backed by Jetty 8.
Libor
On 06/20/2012 09:09 AM, Eric Bovic wrote:
> Hello
>
> I'm trying to run a VaadionAddon called "dontpush-ozonelayer"
> vaadin.com/directory#addon/dontpush-ozonelayer on Equinox.
>
> In the BundleActivator class the Servlet is registered on HttpService;
> here some code:
>
> Hashtable<String, String> param = new Hashtable<String, String>();
> param.put("description", "Vaadin application class to start");
> param.put("application", "myapp.DontpushApplication");
>
> ServiceReference sRef =
> context.getServiceReference(HttpService.class.getName());
> if (sRef != null) {
> HttpService service = (HttpService) context.getService(sRef);
> service.registerServlet("/*", new DontPushOzoneServlet(), param, null);
> }
>
> then i get this Exception:
>
> Caused by: java.lang.UnsupportedOperationException: HttpService only
> supports servlet 2.1 specification.
> at
> org.eclipse.equinox.http.servlet.ServletContextImpl.getInitParameterNames(ServletContextImpl.java:422)
>
> at
> com.vaadin.terminal.gwt.server.AbstractApplicationServlet.init(AbstractApplicationServlet.java:228)
>
> at
> com.vaadin.terminal.gwt.server.ApplicationServlet.init(ApplicationServlet.java:54)
>
> at
> org.vaadin.dontpush.server.DontPushOzoneServlet.init(DontPushOzoneServlet.java:55)
>
> at
> org.eclipse.equinox.http.HttpListener.registerServlet(HttpListener.java:333)
>
> ... 17 more
>
>
> I use this HttpService Implementation:
> org.eclipse.equinox.http_1.0.500.v20110413.jar
>
> When i try to start Equinox whithout this lib, and try to use the
> jetty-http-8.1.4.v20120524.jar ServiceReference sRef =
> context.getServiceReference(HttpService.class.getName()); returns null
>
> HttpService is org.osgi.service.http from org.osgi.compendium-4.2.0
>
> Does anyone have an idea for this Problem?
> I am grateful for any help.
>
> Thanks
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03402 seconds