Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] openAM with Jetty => embed a single jetty in multiple web apps

Hi Bao,

Take a look at the examples of jetty embedded in the src repo here for some hints:

http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/example-jetty-embedded/src/main/java/org/eclipse/jetty/embedded?h=jetty-8

cheers
Jan


On 9 November 2012 00:53, Ho.Tri.Bao <hotribao@xxxxxxxxx> wrote:
Hello,

These are 2 questions but they are correlated:

1. Does anybody successfully used openAM with jetty 8/9? In the download page of openAM (http://forgerock.org/openam.html), there is no stable agent build for jetty. And even the nightly build is for jetty 6. (I've tried that agent nightly build with jetty 8 and saw that it seems work)

2. Assumely we can use openAM agent in jetty, I see that the agent installer will place a agentapp.war file to jetty webapps folder. However, I want to deploy my app with embedded jetty, not standalone. How would I pack jetty, my app WAR and agentapp.war into a single war file to run under jetty embedded mode? Currently, I have the following code

WebAppContext contextHandler = new WebAppContext();
contextHandler.setContextPath("xyz");
ProtectionDomain protectionDomain = RestoProdServer.class.getProtectionDomain();
URL location = protectionDomain.getCodeSource().getLocation();
contextHandler.setWar(location.toExternalForm());

how the code change if I have 3 WARs?

Thanks,
Bao.

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




--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com – Developer advice, services and support
from the Jetty & CometD experts.

Back to the top