Add servletClass apps.properties option to make the servlet class customizable.
This commit is contained in:
parent
4f5a119d6a
commit
d781142af1
1 changed files with 5 additions and 1 deletions
|
@ -341,6 +341,7 @@ public class ApplicationManager implements XmlRpcHandler {
|
||||||
String debug;
|
String debug;
|
||||||
boolean encode;
|
boolean encode;
|
||||||
Repository[] repositories;
|
Repository[] repositories;
|
||||||
|
String servletClassName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* extend apps.properties, add [appname].ignore
|
* extend apps.properties, add [appname].ignore
|
||||||
|
@ -379,6 +380,7 @@ public class ApplicationManager implements XmlRpcHandler {
|
||||||
appDir = (appDirName == null) ? null : getAbsoluteFile(appDirName);
|
appDir = (appDirName == null) ? null : getAbsoluteFile(appDirName);
|
||||||
String dbDirName = conf.getProperty("dbdir");
|
String dbDirName = conf.getProperty("dbdir");
|
||||||
dbDir = (dbDirName == null) ? null : getAbsoluteFile(dbDirName);
|
dbDir = (dbDirName == null) ? null : getAbsoluteFile(dbDirName);
|
||||||
|
servletClassName = conf.getProperty("servletClass");
|
||||||
|
|
||||||
// got ignore dirs
|
// got ignore dirs
|
||||||
ignoreDirs = conf.getProperty("ignore");
|
ignoreDirs = conf.getProperty("ignore");
|
||||||
|
@ -533,8 +535,10 @@ public class ApplicationManager implements XmlRpcHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
ServletHandler handler = new ServletHandler();
|
ServletHandler handler = new ServletHandler();
|
||||||
|
Class servletClass = servletClassName == null ?
|
||||||
|
EmbeddedServletClient.class : Class.forName(servletClassName);
|
||||||
|
|
||||||
ServletHolder holder = new ServletHolder(EmbeddedServletClient.class);
|
ServletHolder holder = new ServletHolder(servletClass);
|
||||||
handler.addServletWithMapping(holder, "/*");
|
handler.addServletWithMapping(holder, "/*");
|
||||||
|
|
||||||
holder.setInitParameter("application", appName);
|
holder.setInitParameter("application", appName);
|
||||||
|
|
Loading…
Add table
Reference in a new issue