org.apache.jackrabbit.servlet.jackrabbit
Class JackrabbitRepositoryServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.jackrabbit.servlet.AbstractRepositoryServlet
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:
- 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
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 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 |
JackrabbitRepositoryServlet
public JackrabbitRepositoryServlet()
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
getRepository
protected Repository getRepository()
- Returns the configured repository instance.
- Specified by:
getRepository
in class AbstractRepositoryServlet
- Returns:
- repository
Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.