if (!confPath.startsWith("/")) { // TODO implement for Windows too
String basePath = context.getParentResourceComponent().getServerRoot().getAbsolutePath();
confPath = basePath + "/" + confPath;
}
HttpdConfParser parser = new HttpdConfParser();
if (parser.parse(confPath) && parser.isModJkInstalled()) {
Configuration config = context.getDefaultPluginConfiguration();
if (parser.getWorkerPropertiesFile() != null) {
PropertySimple workers = new PropertySimple("workerFile", parser.getWorkerPropertiesFile());
config.put(workers);
}
if (parser.getUriWorkerLocation() != null) {
PropertySimple workers = new PropertySimple("uriWorkerFile", parser.getUriWorkerLocation());
config.put(workers);
}
DiscoveredResourceDetails detail =
new DiscoveredResourceDetails(context.getResourceType(), confPath, "mod_jk", modJkVersion, "Mod_JK",