Class JackrabbitRepositoryServlet

  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.apache.jackrabbit.servlet.AbstractRepositoryServlet
              extended by org.apache.jackrabbit.servlet.jackrabbit.JackrabbitRepositoryServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class JackrabbitRepositoryServlet
extends AbstractRepositoryServlet

Servlet that makes a Jackrabbit repository available as a servlet context attribute. The repository is started during servlet initialization and shut down when the servlet is destroyed.

The supported initialization parameters of this servlet are:

Name of the servlet context attribute to put the repository in. The default value is "javax.jcr.Repository".
Path of the repository home directory. The default value is "jackrabbit-repository". The home directory is automatically created during servlet initialization if it does not already exist.
Path of the repository configuration file. The default value is "repository.xml" within the configured repository home directory. A standard configuration file is automatically copied to the configured location during servlet initialization if the file does not already exist.

The repository servlet can also be mapped to the URL space. See AbstractRepositoryServlet for the details.

See Also:
Serialized Form

Constructor Summary
Method Summary
 void destroy()
          Removes the repository from the servlet context and shuts it down.
protected  Repository getRepository()
          Returns the configured repository instance.
 void init()
          Starts the repository instance and makes it available in the servlet context.
Methods inherited from class org.apache.jackrabbit.servlet.AbstractRepositoryServlet
doGet, getAttributeName, getInitParameter
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, 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

Constructor Detail


public JackrabbitRepositoryServlet()
Method Detail


public void init()
          throws javax.servlet.ServletException
Starts the repository instance and makes it available in the servlet context.

init in class AbstractRepositoryServlet
javax.servlet.ServletException - if the repository can not be started


public void destroy()
Removes the repository from the servlet context and shuts it down.

Specified by:
destroy in interface javax.servlet.Servlet
destroy in class AbstractRepositoryServlet


protected Repository getRepository()
Returns the configured repository instance.

Specified by:
getRepository in class AbstractRepositoryServlet

Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.