From: Martin N. <mar...@gm...> - 2008-04-25 10:28:29
|
Hello. What I am trying to do is to deploy to already running server. I did not find any other way than to use ContextDeployer (if it exists, I will be pleased to learn it). I tried to use minimal xml and put into the /contexts folder: <?xml version="1.0" encoding="ISO-8859-1"?> <Configure class="org.mortbay.jetty.webapp.WebAppContext"> <Set name="contextPath">/zk2</Set> <Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/zk.war</Set> </Configure> I have several questions: 1) Why is the contextPath needed in the xml that I put into /contexts folder? It seems it is not used anyway. My jetty-web.xml in zk.war looks like: <?xml version="1.0" encoding="UTF-8"?> <Configure class="org.mortbay.jetty.webapp.WebAppContext"> <Set name="contextPath">/zk</Set> </Configure> Now I have 2 instances running (at least two MBeans as observed through the jconsole), but both on the same context path /zk taken from the war file. Where is the contextPath from the zk.xml in /contexts folder? 2) Is it possible to destroy the preceding MBean and force the new MBean to have id=0 instead of id=1, 2, ... when using the context deployment through some xml file in /contexts folder? 3) In README.txt in /contexts folder there is "Frequenty the context configuration files here will reference war files or directories from $JETTY_HOME/webapps. Care must be taken to avoid a WebAppDeployer deploying duplicates of such webapplications." May I ask how must I take care to avoid that? From what I've observed it seems that if the contextPath is the same both in jetty-web.xml in the war file and zk.xml in the /contexts folder, it deploys only one instance, is that correct? I hope I wrote it understandably :) Any help would be greatly appreciated. With regards, Martin |