Class 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:

    org.apache.jackrabbit.core.RepositoryContext
    Name of the servlet context attribute to put the internal component context of the repository in. The default value is "org.apache.jackrabbit.core.RepositoryContext".
    javax.jcr.Repository
    Name of the servlet context attribute to put the repository in. The default value is "javax.jcr.Repository".
    repository.home
    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.
    repository.config
    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.

    Since:
    1.4
    See Also:
    Serialized Form
    • Constructor Detail

      • JackrabbitRepositoryServlet

        public JackrabbitRepositoryServlet()
    • Method Detail

      • init

        public void init()
                  throws javax.servlet.ServletException
        Starts the repository instance and makes it available in the servlet context.
        Overrides:
        init in class AbstractRepositoryServlet
        Throws:
        javax.servlet.ServletException - if the repository can not be started
      • destroy

        public void destroy()
        Removes the repository from the servlet context and shuts it down.
        Specified by:
        destroy in interface javax.servlet.Servlet
        Overrides:
        destroy in class AbstractRepositoryServlet