Cherry-pick 390231e8dd
This commit is contained in:
parent
7e39892c4a
commit
4b9b78bb0f
1 changed files with 9 additions and 10 deletions
|
@ -473,10 +473,10 @@ public class ApplicationManager implements XmlRpcHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
// bind to Jetty HTTP server
|
// bind to Jetty HTTP server
|
||||||
if (ApplicationManager.this.jetty != null) {
|
if (jetty != null) {
|
||||||
if(ApplicationManager.this.context == null) {
|
if (context == null) {
|
||||||
ApplicationManager.this.context = new ContextHandlerCollection();
|
context = new ContextHandlerCollection();
|
||||||
ApplicationManager.this.jetty.getHttpServer().setHandler(ApplicationManager.this.context);
|
jetty.getHttpServer().setHandler(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is a static direcory specified, mount it
|
// if there is a static direcory specified, mount it
|
||||||
|
@ -501,9 +501,8 @@ public class ApplicationManager implements XmlRpcHandler {
|
||||||
Class servletClass = servletClassName == null ?
|
Class servletClass = servletClassName == null ?
|
||||||
EmbeddedServletClient.class : Class.forName(servletClassName);
|
EmbeddedServletClient.class : Class.forName(servletClassName);
|
||||||
ServletHolder holder = new ServletHolder(servletClass);
|
ServletHolder holder = new ServletHolder(servletClass);
|
||||||
appContext.addServlet(holder, "/*"); //$NON-NLS-1$
|
holder.setInitParameter("application", appName);
|
||||||
|
appContext.addServlet(holder, "/*");
|
||||||
holder.setInitParameter("application", appName); //$NON-NLS-1$
|
|
||||||
|
|
||||||
if (this.cookieDomain != null) {
|
if (this.cookieDomain != null) {
|
||||||
holder.setInitParameter("cookieDomain", this.cookieDomain); //$NON-NLS-1$
|
holder.setInitParameter("cookieDomain", this.cookieDomain); //$NON-NLS-1$
|
||||||
|
@ -529,9 +528,9 @@ public class ApplicationManager implements XmlRpcHandler {
|
||||||
holder.setInitParameter("debug", this.debug); //$NON-NLS-1$
|
holder.setInitParameter("debug", this.debug); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.protectedStaticDir != null) {
|
if (protectedStaticDir != null) {
|
||||||
File protectedContent = getAbsoluteFile(this.protectedStaticDir);
|
File protectedContent = getAbsoluteFile(protectedStaticDir);
|
||||||
this.appContext.setResourceBase(protectedContent.getPath());
|
appContext.setResourceBase(protectedContent.getPath());
|
||||||
getLogger().info("Serving protected static from " +
|
getLogger().info("Serving protected static from " +
|
||||||
protectedContent.getPath());
|
protectedContent.getPath());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue