Servlet Filters and OSGi HttpService
I am working on an OSGi application that is using org.osgi.service.http.HttpService
that does not support using servlet filters.
Before I realized I couldn't use servlet filters, I was planning on applying a couple of existing filters. These filters set the appropriate HTTP headers for:
- prevent caching of responses
- control rendering in IE8 with header
X-UA-Compatible
What are my options here? I don't want to use items meta
to control caching as this technology is unreliable . Using an element meta
to set the title X-UA-Compatible
is probably acceptable, but I'm still interested in alternative approaches.
a source to share
You can use the dm server to deploy WAR files directly in the OSGi environment. The wars that run on the dm server are completely WAR-related and are completely merged.
Work is currently underway to standardize what it means to be WAR on OSGi. This specification is called the OSGi web container. The work is going very well and I am good about the reference implementation. I will make the alpha RI available in 4-5 days along with a blog post detailing the usage. Follow the SpringSource blogs at blog.springsource.com.
Unfortunately, I cannot link to the dm server because I am a new user :(
a source to share
This issue suggests some possible workarounds for adding Servlet filter support .
also:
The Pax Web [extends] the OSGi Http Service with better support for servlets, filters, listeners, error pages and JSPs and a few others to meet the latest Servlet specifications.
a source to share
Regarding the Pax website:
The examples on the paxweb / Examples page don't work.
For example, I entered this command:
pax-run scan-file: jar: mvn: org.ops4j.pax.web.samples / provision! /sample-helloworld-wc.bundles
than my browser:
http: // localhost: 8080 / helloworld / wc
result:
Error 404 NOT_FOUND
Also, it's not clear to me, from the documentation, if Pax Web will run inside a non-OSGI servlet engine, for example. WebLogic, WebSphere.
a source to share
The Pax web page does not yet work inside a non-OSGI servlet engine (bridged mode). Apache Felix has a good solution for this at http://felix.apache.org .
a source to share