updated global binding test
This commit is contained in:
parent
dfabd48149
commit
7310067954
|
@ -27,6 +27,7 @@ import org.eclipse.jetty.server.handler.ContextHandler;
|
||||||
import org.eclipse.jetty.util.log.Log;
|
import org.eclipse.jetty.util.log.Log;
|
||||||
import org.eclipse.jetty.util.log.Logger;
|
import org.eclipse.jetty.util.log.Logger;
|
||||||
import org.eclipse.jetty.util.resource.Resource;
|
import org.eclipse.jetty.util.resource.Resource;
|
||||||
|
import org.eclipse.jetty.webapp.WebAppClassLoader;
|
||||||
import org.eclipse.jetty.webapp.WebAppContext;
|
import org.eclipse.jetty.webapp.WebAppContext;
|
||||||
import org.eclipse.jetty.xml.XmlConfiguration;
|
import org.eclipse.jetty.xml.XmlConfiguration;
|
||||||
|
|
||||||
|
@ -102,7 +103,7 @@ public class GlobalWebappConfigBinding implements AppLifeCycle.Binding
|
||||||
jettyXmlConfig.getProperties().put("jetty.webapp",file.getCanonicalPath());
|
jettyXmlConfig.getProperties().put("jetty.webapp",file.getCanonicalPath());
|
||||||
jettyXmlConfig.getProperties().put("jetty.webapps",file.getParentFile().getCanonicalPath());
|
jettyXmlConfig.getProperties().put("jetty.webapps",file.getParentFile().getCanonicalPath());
|
||||||
|
|
||||||
jettyXmlConfig.configure(context);
|
WebAppClassLoader.runWithServerClassAccess(()->{jettyXmlConfig.configure(context);return null;});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
|
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
|
||||||
|
|
||||||
<Call name="addServerClass">
|
<Call name="getServerClasspathPattern">
|
||||||
<Arg>org.eclipse.foo.</Arg>
|
<Call name="include">
|
||||||
|
<Arg>org.eclipse.foo.</Arg>
|
||||||
|
</Call>`
|
||||||
</Call>
|
</Call>
|
||||||
|
|
||||||
<!-- Array id="serverClasses" type="java.lang.String">
|
<!-- Array id="serverClasses" type="java.lang.String">
|
||||||
|
|
|
@ -777,6 +777,19 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
|
||||||
return _serverClasses.getPatterns();
|
return _serverClasses.getPatterns();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------ */
|
||||||
|
@Deprecated
|
||||||
|
public void addSystemClass(String clazz)
|
||||||
|
{
|
||||||
|
_systemClasses.add(clazz);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------ */
|
||||||
|
@Deprecated
|
||||||
|
public void addServerClass(String clazz)
|
||||||
|
{
|
||||||
|
_serverClasses.add(clazz);
|
||||||
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue