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:
- 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 Summary
Constructors Constructor Description JackrabbitRepositoryServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
-
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 classAbstractRepositoryServlet
- 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 interfacejavax.servlet.Servlet
- Overrides:
destroy
in classAbstractRepositoryServlet
-
getRepository
protected Repository getRepository()
Returns the configured repository instance.- Specified by:
getRepository
in classAbstractRepositoryServlet
- Returns:
- repository
-
-