This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I would like to be able to use the XSL module without having any HTTP server available. Currently, this is imppossible because the module declares a mandatory dependency on HttpServer$Impl. The only direct dependency seems to be in TransformServlet (sp?). In turn, I see that some basic functionality seems to be implemented in terms of the servlet. However, I think that this dependency is too "heavy" because it seems to be purely an implementation detail, as opposed to user-visible cross-module functionality. I think that any functionality that requires HTTPServer$Impl inside the XSL modules should be moved into a bridge module that bridges XSL and HttpServer. Tbat way, the functionality is automatically enabled if (and only if) an HTTPServer$Impl implementation is found and the XSL module is enabled. However, I don't think that the "preview transformation" feature should be disabled even if there is no HTTPServer$Impl. I think there are other ways of implementing it besides using a servlet (e.g. generating a temporary file and then giving the web browser a file:// URL).
What about following implementation: private static boolean isServletEngineProvided() { Collection instances = Lookup.lookup( new Lookup.Template(ModuleInfo.class)).allInstances(); Iterator it = instances.iterator(); ModuleInfo next; while (it.hasNext()) { next = it.next(); String provides[] = next.getProvides(); for (int i = 0; i<provides.length; i++) { if ("org.openide.util.HttpServer$Impl".equals(provides[i])) { return true; } } } return false; } then you can construct UI dynamically (removing preview option if necessary).
Petr, that kind of change seems only helpful if the intention is to disable the preview feature when no HTTP server is found. But, without the preview feature the XSL module is much less useful (since the user has to use another tool to do the preview). I can look into re-implementing the preview feature to generate a temporary file and sending file:// URLs to the web browser.