Eepsite: Fix config class names, fix webapp environment
This commit is contained in:
@ -25,7 +25,7 @@ public class WebAppProviderConfiguration {
|
||||
public static void configure(ContextProvider wap) {
|
||||
// Not in Jetty 12 but these are the two defaults
|
||||
//String[] classNames = WebAppContext.getDefaultConfigurationClasses();
|
||||
String[] classNames = { "org.eclipse.jetty.ee8.webapp.WebXMLConfiguration", "org.eclipse.jetty.ee8.webapp.JettyWebXMLConfiguration" };
|
||||
String[] classNames = { "org.eclipse.jetty.ee8.webapp.WebXmlConfiguration", "org.eclipse.jetty.ee8.webapp.JettyWebXmlConfiguration" };
|
||||
int sz = classNames.length;
|
||||
String[] newClassNames = new String[sz + 1];
|
||||
for (int j = 0; j < sz; j++) {
|
||||
|
@ -206,7 +206,7 @@ public class WebAppStarter {
|
||||
if (classNames.length == 0) {
|
||||
//classNames = wac.getDefaultConfigurationClasses();
|
||||
// These are the defaults as documented in WebAppContext
|
||||
classNames = new String[] { "org.eclipse.jetty.ee8.webapp.WebXMLConfiguration", "org.eclipse.jetty.ee8.webapp.JettyWebXMLConfiguration" };
|
||||
classNames = new String[] { "org.eclipse.jetty.ee8.webapp.WebXmlConfiguration", "org.eclipse.jetty.ee8.webapp.JettyWebXmlConfiguration" };
|
||||
}
|
||||
List<String> newClassNames = new ArrayList<String>(Arrays.asList(classNames));
|
||||
for (String name : newClassNames) {
|
||||
|
@ -182,6 +182,29 @@
|
||||
</Arg>
|
||||
</Call>
|
||||
|
||||
<!-- Setup ee8 environment -->
|
||||
<!-- First call needed to initialize the class and prevent NPE -->
|
||||
<Call class="org.eclipse.jetty.util.component.Environment" name="get" >
|
||||
<Arg>foo</Arg>
|
||||
</Call>
|
||||
<New id="EBuilder" class="org.eclipse.jetty.xml.EnvironmentBuilder" >
|
||||
<Arg>ee8</Arg>
|
||||
</New>
|
||||
<Ref refid="EBuilder">
|
||||
<Call id="Environment" name="build" />
|
||||
</Ref>
|
||||
<Ref refid="Environment">
|
||||
<Call class="org.eclipse.jetty.util.Attributes" name="setAttribute">
|
||||
<Arg>contextHandlerClass</Arg>
|
||||
<Arg>org.eclipse.jetty.ee8.webapp.WebAppContext</Arg>
|
||||
</Call>
|
||||
</Ref>
|
||||
<Call class="org.eclipse.jetty.util.component.Environment" name="set" >
|
||||
<Arg>
|
||||
<Ref refid="Environment"/>
|
||||
</Arg>
|
||||
</Call>
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- Configure the context deployer -->
|
||||
<!-- A context deployer will deploy contexts described in -->
|
||||
|
Reference in New Issue
Block a user