Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Adding/Removing a webapp to an embedded Jetty

I believe it is a way of embedding jetty. The default jetty server is started independently of your decision and you can contribute servlets and web apps using jetty's API in conjunction with the OSGi's one. Given that it naturally allows hot deployment and removal of web apps, servlets. That is why I suggested you search from that point to get a notion of how things are done. Possibly there is a simple way to do it just operating the jetty's API. I think it is something to do with http://wiki.eclipse.org/Jetty/Feature/Deployment_Manager DeploymentManager. I might need to find a suitable AppProvider or make one.

On 01.11.2011 13:12, Alan Williamson (aw2.0 cloud experts) wrote:
Thank you Ivan for that.

OSGi is something i am not familiar with, is this a different way of loading up Jetty and having it manage the resources?

Does Jetty itself not have ways to do this?

Ivan Larionov wrote:
Hi,

It is highly likely that this will not be extremely helpful for you, but anyway, in my osgi environment I can add web applications as described here http://wiki.eclipse.org/Jetty/Feature/Jetty_OSGi#The_OSGi_service_.27org.eclipse.jetty.server.handler.ContextHandler.27. I believe one can follow the source code of jetty to find out how it does it.

Regards,
Ivan

On 31.10.2011 11:31, Alan Williamson (aw2.0 cloud experts) wrote:
I asked this on StackOverflow, but no one was around.

http://stackoverflow.com/questions/7909100/adding-removing-a-webapp-to-an-embedded-jetty

I have a Jetty embedded server started up.

I wish to be able to do a hot deploy of a webapp and be able to unload it again, all programmatically.

Once the server is started, any attempts to add a handler to it throws an error.

I tried using ContextHandlerCollection and then using .addContext() to get it up and running but not sure if that is the right way to go about it.

Can someone please point me in the right direction? thank you


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users


--
Best regards,
Ivan Larionov



Back to the top