Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-dev] Running the OSGi HttpService and a webapp together on '/'

Hi everyone,

I am looking for some guidance on how to run a web application on the
root context path '/' together with the OSGi HttpService.
The HttpService is a servlet context handler running on the root context path.

The behavior I am shooting for is:
- When a request is routed to the root context, make it hit the HttpService
- If the HttpService issues a 404, catch that and in that case route
the request to the web application.
- Ideally support shared or isolated session managers for the
HttpService and the webapp.

On an internal project where we need this feature, I host the
HttpService servlet directly inside the web application and made it
work using various wrappers.
It is a lot of work to support this and it looks clumsy. So it would
be difficult to document it if someone else needs this.

I suspect that if we can customize the routing of the request inside
jetty we should be able to do a better job at this.
Here is the bug for this particular use-case:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=344910

Thanks!
Hugues


Back to the top