|
Page Edited :
FELIX :
Apache Felix Web Console
Apache Felix Web Console has been edited by Felix Meschberger (Jun 09, 2009). Content:Requirements | Installation | Configuration | Security | Browser Compliance | Extending the Web Console | The AbstractWebConsolePlugin | Helper | Further issues with respect to extensions | Issues | Screenshots
The Apache Felix Web Console is a simple tool to inspect and manage OSGi framework instances using your favourite Web Browser. RequirementsThe Web Console only has a single required dependency on the framework: A running implementation of the OSGi Http Service Specification. The reason for this is, that the Web Console is implemented as a servlet (actually just a gateway servlet dispatching to Web Console plugins) which is registered with the Http Service. If your framework does not yet have a Http Service installed, you might select from a variety of such implementations. The following is just an incomplete list:
Apart from that Web Console has the following dependencies, which do not need to be satisfied. In this case the respective functionality is just missing.
Note, that the Apache Felix Declarative Services implementation is the only Apache Felix dependency contained in the Web Console. If you do not use the Apache Felix Declarative Services implementation, you just cannot inspect the declared components (because there is no official public API for this). Otherwise the Web Console perfectly operates without any problems. InstallationTo install just use your favourite current means of installing new bundles in to the OSGi framework. For example using the Apache Felix shell console you might do: > install http://mirror.switch.ch/mirror/apache/dist/felix/org.apache.felix.webconsole-1.0.0.jar bundle x > start x
The default values apply if the respective property is missing from the configuration or if no configuration is provided at all. Configuration of the OSGi Http ServiceAs said above, the configuration of the OSGi Http Service used by the Web Console to register itself is outside of the scope of the Web Console. Lets just say, the OSGi Http Service specification defines a system propety – org.osgi.service.http.port – which may be set to define the port at which the Http Service should listen for HTTP requests. The respective Http Service implementation may define additional properties to define the actual interface on which to listen or to define a servlet context path. By default it is probably safe to assume, that having set the org.osgi.service.http.port to a defined value, the Http Service implementation will listen on all interfaces for requests at the set port number and that no servlet context path actually exists. For example, given the org.osgi.service.http.port property is set to 8888 the Web Console in the local system can be reached at : http://localhost:8888/system/console If you happen to deploy an OSGi framework instance inside a traditional web application and thus the Http Service implementation is actually a bridge into the existing servlet container (see for example Equinox in a Servlet Container SecurityThe Web Console only has very basic security at the moment supporting only HTTP Basic authentication. This security is enabled by default and may be disabled by simply clearing the username property. To enhance the security of the Web Console you strongly encouraged to change at least the password for the admin user. Browser ComplianceThe goal of the Web Console is to support as big a range of Web Browsers as possible. As it stands now, Firefox (versions 2 and 3), Opera and Internet Explorer (versions 6 and 7) seem to be capable of using the Web Console. Should you encounter any problems with your particular browser, please report an issue for the Web Console in our issue tracking system (JIRA Beginning with Release 1.2.8 the Web Console is using JQuery to enhance the user experience. This should also help in keeping browser support on the broadest possible basis. Extending the Web ConsoleThe Web Console can be extended by registering an OSGi service for the interface javax.servlet.Servlet with the service property felix.webconsole.label set to the label (last segment in the URL) of the page. The respective service is called a Web Console Plugin or a plugin for short. The AbstractWebConsolePluginTo leverage the rendering of the common header and footer around the plugin's data area, the plugin must extend the abstract org.apache.felix.webconsole.AbstractWebConsolePlugin class implementing the following methods:
To fully leverage the AbstractWebConsolePlugin it must be initialiazed before registering the extension as a service. Likewise after unregistering the service, the plugin should be destroyed. To this avail the following methods are provided in the AbstractWebConsolePlugin:
In addition to these OSGi-oriented setup methods the Web Console itself will call the Servlet.init(ServletConfig) method before putting the plugin into service and the Servlet.destroy() method when the plugin is removed. HelperBefore calling the plugin the Web Console sets the org.apache.felix.webconsole.internal.servlet.OsgiManager.appRoot request attribute to the root path of the web console consisting of the servlet context path (HttpServletRequest.getContextPath()) and the servlet path of the web console (HttpServletRequest.getServletPath()). This request attribute may be used by plugins to render absolute links. Further issues with respect to extensions
IssuesShould you have any questions using the Web Console, please send a note to one of our Mailing Lists. Please report any issues with the Web Console in our issue tracking system (JIRA Screenshots
|
Unsubscribe or edit your notifications preferences
