org.jivesoftware.whack.container
Class ComponentServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.jivesoftware.whack.container.ComponentServlet
- All Implemented Interfaces:
- Serializable, Servlet, ServletConfig
public class ComponentServlet
- extends HttpServlet
The component servlet acts as a proxy for web requests (in the web admin)
to components. Since components can be dynamically loaded and live in a different place
than normal Whack admin console files, it's not possible to have them
added to the normal Whack admin console web app directory.
The servlet listens for requests in the form /components/[componentName]/[JSP File]
(e.g. /components/foo/example.jsp). It also listens for image requests in the
the form /components/[componentName]/images/*.png|gif (e.g.
/components/foo/images/example.gif).
JSP files must be compiled and available via the component's class loader. The mapping
between JSP name and servlet class files is defined in [componentName]/web/web.xml.
Typically, this file is auto-generated by the JSP compiler when packaging the component.
- Author:
- Matt Tucker, Gaston Dombiak
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ComponentServlet
public ComponentServlet()
init
public void init(ServletConfig config)
throws ServletException
- Specified by:
init
in interface Servlet
- Overrides:
init
in class GenericServlet
- Throws:
ServletException
service
public void service(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Overrides:
service
in class HttpServlet
- Throws:
ServletException
IOException
registerServlets
public static void registerServlets(ComponentFinder finder,
org.xmpp.component.Component component,
File webXML)
- Registers all JSP page servlets for a component.
- Parameters:
finder
- the component finder.component
- the component.webXML
- the web.xml file containing JSP page names to servlet class file
mappings.
unregisterServlets
public static void unregisterServlets(File webXML)
- Unregisters all JSP page servlets for a component.
- Parameters:
webXML
- the web.xml file containing JSP page names to servlet class file
mappings.
Copyright © 2003-2008 Jive Software.