public static String registerServlet(PluginManager pluginManager,
            Plugin plugin, GenericServlet servlet, String relativeUrl)
            throws ServletException {

        String pluginName = pluginManager.getPluginPath(plugin).getFileName().toString();
        PluginServlet.pluginManager = pluginManager;
        if (servlet == null) {
            throw new ServletException("Servlet is missing");
        }
        String pluginServletUrl = pluginName + relativeUrl;
        servlets.put((pluginName + relativeUrl).toLowerCase(), servlet);
        return PLUGINS_WEBROOT + pluginServletUrl;
        
    }
Registers a live servlet for a plugin programmatically, does not
initialize the servlet.

@param pluginManager the plugin manager
@param plugin the owner of the servlet
@param servlet the servlet.
@param relativeUrl the relative url where the servlet should be bound
@return the effective url that can be used to initialize the servlet
@throws ServletException if the servlet is null
xmppserver/src/main/java/org/jivesoftware/openfire/container/PluginServlet.java