Skip to content

Multiple http contexts #2081

@garpinc

Description

@garpinc

Prior to the new version in my old version essentially I had a different httpContext for every servlet. Not sure if this is ideal but it did work.

In a few of the httpContext I have listeners that get registered. What seems to be now happening is org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.visitEventListenerModelChange there is a comment:
// we have to stop the context, so existing ServletContextListeners are called
// with contextDestroyed() and new listener is added according to ranking rules of
// the EventListenerModel

so to install the listener (where all seem to have contextPath=/) it shutsdown the context which in turn appears to shutdown the contextlisteners at /. I had previously registered a spring ContextLoaderListener in a whole different bundle with a whole different httpcontext but it goes ahead and shuts that down.

Shouldn't there be a way to specify the contextPath for a particular httpContext

It appears in org.ops4j.pax.web.service.spi.model.ServiceModel.createDefaultHttpContext(String) there is someway to override the default but i don't know what effect that will him. The servlets themselves in the context have unique urls i.e: /abc /def even if these are from 2 different httpcontexts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions