*/
public FilterSetCollection webXMLFilter() {
//System.out.println("AppFormat.webXMLFilter: appPaths = " + appPaths);
//System.out.println("AppFormat.webXMLFilter: frameworkPaths = " + frameworkPaths);
//System.out.println("AppFormat.webXMLFilter: otherClasspaths = " + otherClasspaths);
FilterSet filter = new FilterSet();
String WEBINFROOT = "WEBINFROOT";
List<String> paths = new LinkedList<String>();
if (appPaths != null && appPaths.length() > 0) {
appPaths = appPaths.trim();
for (String appPath : appPaths.split("\n")) {
paths.add(WEBINFROOT + stripPath(appPath));
}
}
if (frameworkPaths != null && frameworkPaths.length() > 0) {
frameworkPaths = frameworkPaths.trim();
for (String frameworkPath : frameworkPaths.split("\n")) {
paths.add(WEBINFROOT + "/" + getApplicatonTask().getName() + ".woa/Contents" + stripPath(frameworkPath));
}
}
if (otherClasspaths != null && otherClasspaths.length() > 0) {
otherClasspaths = otherClasspaths.trim();
for (String otherPath : otherClasspaths.split("\n")) {
paths.add(WEBINFROOT + stripPath(otherPath));
}
}
StringBuffer pathsBuffer = new StringBuffer();
for (String path : paths) {
pathsBuffer.append(path);
pathsBuffer.append("\n");
}
WOApplication woappTask = (WOApplication) this.task;
log(" AppFormat.webXMLFilter().woappTask: " + woappTask, Project.MSG_VERBOSE);
filter.addFilter("WOROOT", woappTask.getWebXML_WOROOT());
filter.addFilter("LOCALROOT", woappTask.getWebXML_LOCALROOT());
filter.addFilter("WOAINSTALLROOT", woappTask.getWebXML_WOAINSTALLROOT());
filter.addFilter("WOAppMode", woappTask.getWebXML_WOAppMode());
filter.addFilter("WOClasspath", pathsBuffer.toString());
filter.addFilter("WOApplicationClass", this.getAppClass());
filter.addFilter("WOServletAdaptor", this.getServletAdaptor());
filter.addFilter("WOTagLib", woappTask.getWebXML_WOtaglib());
String customContent = woappTask.getWebXML_CustomContent();
if (customContent == null) {
customContent = "";
}
filter.addFilter("CustomContent", customContent);
return new FilterSetCollection(filter);
}