You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Tom Anderson <to...@e2x.co.uk> on 2010/01/23 16:42:27 UTC
Which jar to use to add Jackrabbit to a web app as a resource?
Hi,
I am writing a little web application to fiddle with JCR, using Jackrabbit
as the implementation. I'll write a few servlets and JSPs and so on to
display and manipulate JCR items. I'd like to add a repository as a
resource, in the orthodox J2EE manner, with a resource-ref entry in the
web.xml and a corresponding entry in the container's configuration (in
this case, Jetty's jetty-env.xml) - what is called in the documentation
"Model 1: The (Web-) Application Bundle" [1].
So far, so good. But what i'm not sure of what i need to add to my web
app's lib directory. The downloads page [2] gives me four options: a
source jarball, a standalone server, a web application, and a resource
adapter. Having had a look at the descriptions of these linked from the
components page [3], i don't think any of these are what i want: i want
classes, not source; i want a component, not a standalone server; i want a
component, not a web application in its own right; i want a library i can
use inside a web app, not a JCA resource adapter.
So, what do i use? I'm guessing that i can use the standalone or web app
jars and get away with it, but i'd prefer to use a minimal set of classes.
Should i be getting the Jackrabbit core jar, and using that and all its
dependencies? If so, what are those dependencies?
Thanks,
tom
[1] http://jackrabbit.apache.org/deployment-models.html
[2] http://jackrabbit.apache.org/downloads.html
[3] http://jackrabbit.apache.org/jackrabbit-components.html
--
Tom Anderson | e2x Ltd, 8 Elder Street, London E1 6BT
(e) tom.anderson@e2x.co.uk | (m) +44 (7960) 989794 | (f) +44 (20) 7194 8016
Re: Which jar to use to add Jackrabbit to a web app as a resource?
Posted by ChadDavis <ch...@gmail.com>.
I recommend using the jackrabbit-webapp webapp. It has a servlet that
is there just to provide access to the repository, which is
bootstrapped by another servlet dedicated to that purpose. I think
this module contains all dependencies except for the jcr jar itself.
On Sat, Jan 23, 2010 at 8:42 AM, Tom Anderson <to...@e2x.co.uk> wrote:
> Hi,
>
> I am writing a little web application to fiddle with JCR, using Jackrabbit
> as the implementation. I'll write a few servlets and JSPs and so on to
> display and manipulate JCR items. I'd like to add a repository as a
> resource, in the orthodox J2EE manner, with a resource-ref entry in the
> web.xml and a corresponding entry in the container's configuration (in this
> case, Jetty's jetty-env.xml) - what is called in the documentation "Model 1:
> The (Web-) Application Bundle" [1].
>
> So far, so good. But what i'm not sure of what i need to add to my web app's
> lib directory. The downloads page [2] gives me four options: a source
> jarball, a standalone server, a web application, and a resource adapter.
> Having had a look at the descriptions of these linked from the components
> page [3], i don't think any of these are what i want: i want classes, not
> source; i want a component, not a standalone server; i want a component, not
> a web application in its own right; i want a library i can use inside a web
> app, not a JCA resource adapter.
>
> So, what do i use? I'm guessing that i can use the standalone or web app
> jars and get away with it, but i'd prefer to use a minimal set of classes.
> Should i be getting the Jackrabbit core jar, and using that and all its
> dependencies? If so, what are those dependencies?
>
> Thanks,
> tom
>
> [1] http://jackrabbit.apache.org/deployment-models.html
> [2] http://jackrabbit.apache.org/downloads.html
> [3] http://jackrabbit.apache.org/jackrabbit-components.html
>
> --
> Tom Anderson | e2x Ltd, 8 Elder Street, London E1
> 6BT
> (e) tom.anderson@e2x.co.uk | (m) +44 (7960) 989794 | (f) +44 (20) 7194
> 8016
>