views:

60

answers:

1

Hi all,

I am using Jetty 6 to host multiple web applications for various domains. I am doing the exploded WAR route, so how would I configure that in Jetty? Would I still set the war path and then say extractWar = false?

http://jetty.codehaus.org/jetty/jetty-6/apidocs/org/mortbay/jetty/webapp/WebAppContext.html

<Configure class="org.mortbay.jetty.webapp.WebAppContext">
        <Set name="war"><SystemProperty name="jetty.home"/>/webapps/walterjwhite.com</Set>
        <Set name="extractWAR">false</Set>
        <Set name="contextPath">/</Set>
        <Set name="virtualHosts">
            <Array type="java.lang.String">
                <Item>www.walterjwhite.com</Item>
                <Item>walterjwhite.com</Item>
            </Array>
        </Set>
    </Configure>

I didn't see an example in the documentation, so I'm hoping to get steered in the right direction before testing it out.

Walter

A: 

extractWar doesn't matter when your webapp is exploded. Look at the test app included in the Jetty 6 distribution, just point to your webapp directory and you're good to go.

Martin
Thanks Martin, I got it working much more easily than anticipated. I'm just storing that in jetty-env.xml inside the web application.