|
Openfire 3.9.2 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.jivesoftware.openfire.container.PluginServlet
public class PluginServlet
The plugin servlet acts as a proxy for web requests (in the admin console) to plugins. Since plugins can be dynamically loaded and live in a different place than normal Openfire admin console files, it's not possible to have them added to the normal Openfire admin console web app directory.
The servlet listens for requests in the form /plugins/[pluginName]/[JSP File] (e.g. /plugins/foo/example.jsp). It also listens for non JSP requests in the form like /plugins/[pluginName]/images/*.png|gif, /plugins/[pluginName]/scripts/*.js|css or /plugins/[pluginName]/styles/*.css (e.g. /plugins/foo/images/example.gif).
JSP files must be compiled and available via the plugin's class loader. The mapping between JSP name and servlet class files is defined in [pluginName]/web/web.xml. Typically, this file is auto-generated by the JSP compiler when packaging the plugin. Alternatively, if development mode is enabled for the plugin then the the JSP file will be dynamically compiled using JSPC.
Field Summary | |
---|---|
static String |
PLUGINS_WEBROOT
|
Constructor Summary | |
---|---|
PluginServlet()
|
Method Summary | |
---|---|
void |
init(javax.servlet.ServletConfig config)
|
static String |
registerServlet(PluginManager pluginManager,
Plugin plugin,
javax.servlet.GenericServlet servlet,
String relativeUrl)
Registers a live servlet for a plugin programmatically, does not initialize the servlet. |
static void |
registerServlets(PluginManager manager,
Plugin plugin,
File webXML)
Registers all JSP page servlets for a plugin. |
void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
static javax.servlet.GenericServlet |
unregisterServlet(Plugin plugin,
String url)
Unregister a live servlet for a plugin programmatically. |
static void |
unregisterServlets(File webXML)
Unregisters all JSP page servlets for a plugin. |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PLUGINS_WEBROOT
Constructor Detail |
---|
public PluginServlet()
Method Detail |
---|
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
service
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
public static void registerServlets(PluginManager manager, Plugin plugin, File webXML)
manager
- the plugin manager.plugin
- the plugin.webXML
- the web.xml file containing JSP page names to servlet class file
mappings.public static void unregisterServlets(File webXML)
webXML
- the web.xml file containing JSP page names to servlet class file
mappings.public static String registerServlet(PluginManager pluginManager, Plugin plugin, javax.servlet.GenericServlet servlet, String relativeUrl) throws javax.servlet.ServletException
pluginManager
- the plugin managerplugin
- the owner of the servletservlet
- the servlet.relativeUrl
- the relative url where the servlet should be bound
javax.servlet.ServletException
public static javax.servlet.GenericServlet unregisterServlet(Plugin plugin, String url) throws javax.servlet.ServletException
plugin
- the owner of the servletservletUrl
- the relative url where servlet has been bound
javax.servlet.ServletException
|
Openfire 3.9.2 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |