org.apache.jackrabbit.servlet
Class ContextRepositoryServlet

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

public class ContextRepositoryServlet
extends AbstractRepositoryServlet

Servlet that makes a repository from one servlet context attribute available as another servlet context attribute. The source context can be different from the context of this servlet.

The supported initialization parameters of this servlet are:

javax.jcr.Repository
Name of the target servlet context attribute. The default value is "javax.jcr.Repository".
path
Context path of the source servlet context. The source context defaults to the context of this servlet if this parameter is not set.
name
Name of the source servlet context attribute. The default value is "javax.jcr.Repository". The name of the source attribute can be the same as the name of target attribute only if the source context is different from the context of this servlet.

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

Since:
1.4
See Also:
Serialized Form

Constructor Summary
ContextRepositoryServlet()
           
 
Method Summary
protected  Repository getRepository()
          Creates and returns the repository in the configured servlet context attribute.
 
Methods inherited from class org.apache.jackrabbit.servlet.AbstractRepositoryServlet
destroy, doGet, getAttributeName, getInitParameter, init
 
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

ContextRepositoryServlet

public ContextRepositoryServlet()
Method Detail

getRepository

protected Repository getRepository()
                            throws RepositoryException
Creates and returns the repository in the configured servlet context attribute.

Specified by:
getRepository in class AbstractRepositoryServlet
Returns:
repository
Throws:
RepositoryException - if the repository could not be created


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