DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
renderContext(HttpServletRequest, HttpServletResponse)– This method is called to render the actual plugin data area.getLabel()– Returns the last path segment of the plugin page. This should return the value to which thefelix.webconsole.labelservice registration propery is set.getTitle()– Returns a human readable title to be displayed at the top of the plugin page.getCssReferences()– See the section Providing CSS Files below.
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.
Providing CSS Files
Part of rendering the header, the AbstractWebConsolePlugin also emits links to CSS files to include for displaying the page. Since such CSS links may only be present in the header section of the generated HTML the getCssReferences() method is provided. This method is called to create links for additional CSS files. The default implementation of this method returns null meaning no additional CSS links to be rendered. Extensions of the AbstractWebConsolePlugin may overwrite this method to provide a list of CSS links.
The CSS links provided by the getCssReferences() method may be absolute or relative paths, though relative paths are recommended. Relative paths are turned into absolute path by prepending them with the value of the felix.webconsole.appRoot request attribute.
Transparent Response Wrapping
...
felix.webconsole.title– If registered servlet does not extend theAbstractWebConsolePluginbut provides this property (of typeString) the servlet is wrapped in an adapter to theAbstractWebConsolePluginwhich callsServlet.service(ServletRequest, ServletResponse)method on behalf of therenderContentimplementation.felix.webconsole.css– Defines a single string, an array of strings or a Collection of strings to be used as the values provided by thegetCssReferences()method. This property is optional. If this property is missing or if the value does not have the correct type, thegetCssReferences()just returnsnullassuming there are no additional CSS resources to reference.
The wrapper around the plugin itself extends the AbstractWebConsolePlugin as follows:
renderContext(HttpServletRequest, HttpServletResponse)– Calls theservice(HttpServletRequest, HttpServletResponse)method of the plugin to render the actual contents of the plugin.getLabel()– Returns the value of thefelix.webconsole.labelservice registration property of the plugin.getTitle()– Returns the value of thefelix.webconsole.titleservice registration property of the plugin.getCssReferences()– Returns the values of thefelix.webconsole.cssservice registration property of the plugin.service(ServletRequest, ServletResponse)– If the request method isGETtheservice(ServletRequest, ServletResponse)method of theAbstractWebConsolePluginis called which ultimately calls therenderContentmethod. For all other requests, theservice(ServletRequest, ServletResponse)method of the plugin is called directly to have the plugin handle any non-GETrequests directly.
...