File webXML = new File(componentDir, "web" + File.separator + "web.xml");
if (webXML.exists()) {
ComponentServlet.registerServlets(this, component, webXML);
}
// If there a <adminconsole> section defined, register it.
Element adminElement = (Element)componentXML.selectSingleNode("/component/adminconsole");
if (adminElement != null) {
// If global images are specified, override their URL.
Element imageEl = (Element)adminElement.selectSingleNode(
"/component/adminconsole/global/logo-image");
if (imageEl != null) {
imageEl.setText("components/" + componentDir.getName() + "/" + imageEl.getText());
}
imageEl = (Element)adminElement.selectSingleNode(
"/component/adminconsole/global/login-image");
if (imageEl != null) {
imageEl.setText("components/" + componentDir.getName() + "/" + imageEl.getText());
}
// Modify all the URL's in the XML so that they are passed through
// the component servlet correctly.
/*List urls = adminElement.selectNodes("//@url");
for (int i=0; i<urls.size(); i++) {