jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: seeking help with jackrabbit-jcr-servlet component
Date Tue, 22 Jul 2008 08:47:41 GMT
Hi,

On Tue, Jul 22, 2008 at 3:03 AM, Betty Chang <bchang@edgenuity.com> wrote:
> I'm trying to write a simple webapp that sits in the same tomcat servlet container as
the jackrabbit server.  I want to
> use this app to configure some custom nodetypes for the repository.
>
> I'm trying to understand the instructions on the local.jsp page about the jackrabbit-jcr-servlet
component.  In particular, it states:
> "See the jackrabbit-jcr-servlet documentation for more details. "
>
> Where is the jackrabbit-jcr-servlet documentation?

See the org.apache.jackrabbit.servlet javadocs in
http://jackrabbit.apache.org/api/1.4/.

> Is it possible for me to use the line of code shown in the local.jsp page to access
> a repository in the jackrabbit app if my webapp is on the same container?

Yes if you your webapp has cross-context access to be able to access
the repository from the jackrabbit-webapp context. In Tomcat that
requires a <Context crossContext="true"/> setting.

> Will I  be able to add custom node types this way?

Yes if the jackrabbit-api extension interfaces are shared within the
container. In Tomcat (6.x) that requires moving the jackrabbit-api jar
file from WEB-INF/lib in jackrabbit-webapp to $CATALINA_HOME/lib.

> I tried the example, but I ended up with an error about my
> context missing the "javax.jcr.repository" attribute.

Are you using the jackrabbit-jcr-servlet classes like
ServletRepository to access the repository? Then instead of the code
snippet in local.jsp you should be using the ContextRepositoryServlet
that copies the repository reference from another context to the
context of your webapp.

Another point, the default attribute name is "javax.jcr.Repository" (capital R).

BR,

Jukka Zitting

Mime
View raw message