2.17.2: 2011-06-17

net.sf.basedb.clients.web.servlet
Class ExtensionsServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by net.sf.basedb.clients.web.servlet.ExtensionsServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class ExtensionsServlet
extends HttpServlet

Servlet for starting the extension system when the web server starts. The servlet should be configured with the <load-on-startup>1</load-on-startup> option in the web.xml file. When the servlet is loaded it will initialise the ExtensionsControl class.

This servlet is also acting as a proxy for requests to extension defined servlets. Such servlets are defined in META-INF/servlets.xml in the extension JAR file. A request to a servlet must have the following URL pattern: /extensions/[jar-name]/[servlet-name].servlet

Version:
2.7
Author:
nicklas
See Also:
Serialized Form
Last modified
$Date: 2008-03-17 14:40:46 +0100 (Mon, 17 Mar 2008) $

Field Summary
private static Pattern ALTERNATE_PATH_MATCH
          Alternatively the servlet is: /extensions/servlet and pathInfo is: /[jar-file-name]/[servlet-name]/optional/path/info
private static Pattern PATH_MATCH
          Path to servlet must match: /extensions/[jar-file-name]/[servlet-name]/optional/path/info.servlet group(1) = Servlet path; group(2) = JAR name, group(3) = Servlet name group(4) = Path info (not including .servlet)
private static long serialVersionUID
           
 
Constructor Summary
ExtensionsServlet()
           
 
Method Summary
 void destroy()
           
protected  void doGet(HttpServletRequest request, HttpServletResponse response)
           
protected  void doPost(HttpServletRequest req, HttpServletResponse resp)
           
 void init()
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
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

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

PATH_MATCH

private static final Pattern PATH_MATCH
Path to servlet must match: /extensions/[jar-file-name]/[servlet-name]/optional/path/info.servlet group(1) = Servlet path; group(2) = JAR name, group(3) = Servlet name group(4) = Path info (not including .servlet)


ALTERNATE_PATH_MATCH

private static final Pattern ALTERNATE_PATH_MATCH
Alternatively the servlet is: /extensions/servlet and pathInfo is: /[jar-file-name]/[servlet-name]/optional/path/info

Constructor Detail

ExtensionsServlet

public ExtensionsServlet()
Method Detail

init

public void init()
          throws ServletException
Overrides:
init in class GenericServlet
Throws:
ServletException

destroy

public void destroy()
Specified by:
destroy in interface Servlet
Overrides:
destroy in class GenericServlet

doGet

protected void doGet(HttpServletRequest request,
                     HttpServletResponse response)
              throws ServletException,
                     IOException
Overrides:
doGet in class HttpServlet
Throws:
ServletException
IOException

doPost

protected void doPost(HttpServletRequest req,
                      HttpServletResponse resp)
               throws ServletException,
                      IOException
Overrides:
doPost in class HttpServlet
Throws:
ServletException
IOException

2.17.2: 2011-06-17