You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Wade Girard <wa...@comcast.net> on 2008/06/09 18:22:13 UTC

Configuring workspace in Standard WEBDAV

I am a newbie

I have successfully configured jackrabbit (with the help of the  
friendly folks on this mailing list) to work under jetty. I have a  
repository that I have renamed from default, populated, and can access  
it perfectly fine. Now I just need a little help with configuring the  
URL to access it. I want to just replace slide with jackrabbit, and in  
order to do that I need to make the URL to access jackrabbit be then  
same as slide is currently set up for. Note that in the jetty config I  
was able to set the url mapping to be "/Jackrabbit" instead of  
"jackrabbit-webapp-1.4".

Current Jackrabbit URL:
http://hostname:port/Jackrabbit/repository/MyRepository

Current Slide URL:
http://hostname:port/MyRepository

So, in the end, I "ideally" want the config in jetty to set the  
mapping to "/MyRepository", but I need to configure the jackrabbit  
webapp will not require /repository.

What do I need to change?

Wade Girard
wade.girard@gmail.com






Re: Configuring workspace in Standard WEBDAV

Posted by Angela Schreiber <an...@day.com>.
> Also, If I open a web browser to http://hostname:port/Jackrabbit I can 
> see the "Apache Jackrabbit JCR Server" web page.

that looks like the default welcome page, that is the redirected
target from index.jsp... in which case the request is not
handled by the dav-servlet. see the last section in the web.xml.
i didn't try it out... but i would guess that this is the reason.

can you open an docu-request for that?
i think we should have a section somewhere explaining how
to configure the prefix... (and what needs to be adjust in addition
if the prefix is missing).

angela

Re: Configuring workspace in Standard WEBDAV

Posted by Wade Girard <wa...@comcast.net>.
Sorry, I must have glazed over that little detail.

That worked!!

Thank you.

On Jun 10, 2008, at 3:58 PM, Alexander Klimetschek wrote:

> On Tue, Jun 10, 2008 at 5:27 PM, Wade Girard  
> <wa...@comcast.net> wrote:
>> I changed the resource-path-prefix back to '/repository' and  
>> changed the
>> servlet mapping described below from '/repository/*' to just '/*'
>
> As I have written before, you have to change both settings to / and / 
> *.
>
> Alex
>
> -- 
> Alexander Klimetschek
> alexander.klimetschek@day.com

Wade Girard
wade.girard@gmail.com






Re: Configuring workspace in Standard WEBDAV

Posted by Alexander Klimetschek <ak...@day.com>.
On Tue, Jun 10, 2008 at 5:27 PM, Wade Girard <wa...@comcast.net> wrote:
> I changed the resource-path-prefix back to '/repository' and changed the
> servlet mapping described below from '/repository/*' to just '/*'

As I have written before, you have to change both settings to / and /*.

Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Re: Configuring workspace in Standard WEBDAV

Posted by Wade Girard <wa...@comcast.net>.
Nothing is appearing in the logs to indicate why this is failing.  
Anyone have any ideas what else needs to be configured?

On Jun 10, 2008, at 10:27 AM, Wade Girard wrote:

> Okay, this is interesting.
>
> I changed the resource-path-prefix back to '/repository' and changed  
> the servlet mapping described below from '/repository/*' to just '/*'
>
> Now, when I try to access the same url from cadaver, it asks for my  
> username and password, then fails
>
> dav:!> open http://hostname:port/Jackrabbit/MyRepository
> Authentication required for Jackrabbit Webdav Server on server  
> `hostname':
> Username: username
> Password:
> Could not access /Jackrabbit/MyRepository/ (not WebDAV-enabled?):
> Did not find a collection resource.
> Connection to `hostname' closed.
>
> If I open a web browser to http://hostname:port/Jackrabbit I now get  
> an HTTP ERROR:500, and if I set the browser to http://hostname:port/ 
> Jackrabbit/MyRepository it does not ask for username/password and  
> shows me everything in the repository.
>
> This seems like progress :-)
>
> On Jun 10, 2008, at 10:00 AM, Alexander Klimetschek wrote:
>
>> Not sure, but I think the servlet mapping and the resource-path- 
>> prefix
>> config of the SimpleWebdavServlet have to be in sync. So you will  
>> also
>> have to change this (it's in the "Servlet Mapping" section of the
>> web.xml):
>>
>> <servlet-mapping>
>>       <servlet-name>Webdav</servlet-name>
>>       <url-pattern>/repository/*</url-pattern>
>> </servlet-mapping>
>>
>> Actually this is what the servlet container uses to map URLs to
>> servlets. I guess the resource-path-prefix is only for the webdav
>> implementation to know it's own path for sending it back as part of
>> certain responses. Just a guess - haven't looked at the code.
>>
>> And above all that, you have the servlet/webapp context path, which
>> gives a root path for each webapp (eg. /jackrabbit/<servlet>/....).
>> One webapp can typically be configured to run at the root of the
>> server, eg. "localhost:8080/*".
>>
>> Regards,
>> Alex
>>
>>
>> -- 
>> Alexander Klimetschek
>> alexander.klimetschek@day.com
>
> Wade Girard
> wade.girard@gmail.com
>
>
>
>
>

Wade Girard
wade.girard@gmail.com






Re: Configuring workspace in Standard WEBDAV

Posted by Wade Girard <wa...@comcast.net>.
Okay, this is interesting.

I changed the resource-path-prefix back to '/repository' and changed  
the servlet mapping described below from '/repository/*' to just '/*'

Now, when I try to access the same url from cadaver, it asks for my  
username and password, then fails

dav:!> open http://hostname:port/Jackrabbit/MyRepository
Authentication required for Jackrabbit Webdav Server on server  
`hostname':
Username: username
Password:
Could not access /Jackrabbit/MyRepository/ (not WebDAV-enabled?):
Did not find a collection resource.
Connection to `hostname' closed.

If I open a web browser to http://hostname:port/Jackrabbit I now get  
an HTTP ERROR:500, and if I set the browser to http://hostname:port/ 
Jackrabbit/MyRepository it does not ask for username/password and  
shows me everything in the repository.

This seems like progress :-)

On Jun 10, 2008, at 10:00 AM, Alexander Klimetschek wrote:

> Not sure, but I think the servlet mapping and the resource-path-prefix
> config of the SimpleWebdavServlet have to be in sync. So you will also
> have to change this (it's in the "Servlet Mapping" section of the
> web.xml):
>
> <servlet-mapping>
>        <servlet-name>Webdav</servlet-name>
>        <url-pattern>/repository/*</url-pattern>
> </servlet-mapping>
>
> Actually this is what the servlet container uses to map URLs to
> servlets. I guess the resource-path-prefix is only for the webdav
> implementation to know it's own path for sending it back as part of
> certain responses. Just a guess - haven't looked at the code.
>
> And above all that, you have the servlet/webapp context path, which
> gives a root path for each webapp (eg. /jackrabbit/<servlet>/....).
> One webapp can typically be configured to run at the root of the
> server, eg. "localhost:8080/*".
>
> Regards,
> Alex
>
>
> -- 
> Alexander Klimetschek
> alexander.klimetschek@day.com

Wade Girard
wade.girard@gmail.com






Re: Configuring workspace in Standard WEBDAV

Posted by Alexander Klimetschek <ak...@day.com>.
Not sure, but I think the servlet mapping and the resource-path-prefix
config of the SimpleWebdavServlet have to be in sync. So you will also
have to change this (it's in the "Servlet Mapping" section of the
web.xml):

<servlet-mapping>
        <servlet-name>Webdav</servlet-name>
        <url-pattern>/repository/*</url-pattern>
</servlet-mapping>

Actually this is what the servlet container uses to map URLs to
servlets. I guess the resource-path-prefix is only for the webdav
implementation to know it's own path for sending it back as part of
certain responses. Just a guess - haven't looked at the code.

And above all that, you have the servlet/webapp context path, which
gives a root path for each webapp (eg. /jackrabbit/<servlet>/....).
One webapp can typically be configured to run at the root of the
server, eg. "localhost:8080/*".

Regards,
Alex


-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Re: Configuring workspace in Standard WEBDAV

Posted by Wade Girard <wa...@comcast.net>.
Okay, I think I am starting to understand.

In the jetty configuration there IS a context, named the HomeContext,  
that is mapped to '/'. But in the same file is where I have the  
JackrabbitContext that is mapped to '/Jackrabbit'.

In the jackrabbit-webapp-1.4.war's WEB-INF/web.xml I changed the  
definition of  the resource-path-prefix from '/repository' to just  
'/'. Is this causing a conflict?

On Jun 10, 2008, at 9:38 AM, Alexander Klimetschek wrote:

> On Tue, Jun 10, 2008 at 4:27 PM, Wade Girard  
> <wa...@comcast.net> wrote:
>> Hmmmm.....
>>
>> Sorry for my ignorance, but I am not sure how to check this...
>>
>> I looked in jetty's request log and I see
>> [Tue, 10 Jun 2008 14:16:21] "OPTIONS /Jackrabbit/MyRepository/ HTTP/ 
>> 1.1" 200
>> 0
>> [Tue, 10 Jun 2008 14:16:21] "PROPFIND /Jackrabbit/MyRepository/  
>> HTTP/1.1"
>> 501 1473
>>
>> Also, If I open a web browser to http://hostname:port/Jackrabbit I  
>> can see
>> the "Apache Jackrabbit JCR Server" web page.
>>
>> I don't see anything to indicate that the request is being handled  
>> by the
>> dav-servlet, meaning that nothing appears in any logs other than  
>> the jetty
>> server request log when I try to connect.
>
> There should only be one servlet configured to "listen" on "/" inside
> its context path. Are you sure this is the case in the modified
> web.xml? Not sure what kind of error messages Jetty gives you in case
> of a conflict. But there should be a way to find out which servlets
> are registered at which path, either in an admin overview or in
> Jetty's logs when it starts the Jackrabbit webapp (don't know Jetty
> enough to be able to tell you).
>
> Regards,
> Alex
>
> -- 
> Alexander Klimetschek
> alexander.klimetschek@day.com

Wade Girard
wade.girard@gmail.com






Re: Configuring workspace in Standard WEBDAV

Posted by Alexander Klimetschek <ak...@day.com>.
On Tue, Jun 10, 2008 at 4:27 PM, Wade Girard <wa...@comcast.net> wrote:
> Hmmmm.....
>
> Sorry for my ignorance, but I am not sure how to check this...
>
> I looked in jetty's request log and I see
> [Tue, 10 Jun 2008 14:16:21] "OPTIONS /Jackrabbit/MyRepository/ HTTP/1.1" 200
> 0
> [Tue, 10 Jun 2008 14:16:21] "PROPFIND /Jackrabbit/MyRepository/ HTTP/1.1"
> 501 1473
>
> Also, If I open a web browser to http://hostname:port/Jackrabbit I can see
> the "Apache Jackrabbit JCR Server" web page.
>
> I don't see anything to indicate that the request is being handled by the
> dav-servlet, meaning that nothing appears in any logs other than the jetty
> server request log when I try to connect.

There should only be one servlet configured to "listen" on "/" inside
its context path. Are you sure this is the case in the modified
web.xml? Not sure what kind of error messages Jetty gives you in case
of a conflict. But there should be a way to find out which servlets
are registered at which path, either in an admin overview or in
Jetty's logs when it starts the Jackrabbit webapp (don't know Jetty
enough to be able to tell you).

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Re: Configuring workspace in Standard WEBDAV

Posted by Wade Girard <wa...@comcast.net>.
Hmmmm.....

Sorry for my ignorance, but I am not sure how to check this...

I looked in jetty's request log and I see
[Tue, 10 Jun 2008 14:16:21] "OPTIONS /Jackrabbit/MyRepository/ HTTP/ 
1.1" 200 0
[Tue, 10 Jun 2008 14:16:21] "PROPFIND /Jackrabbit/MyRepository/ HTTP/ 
1.1" 501 1473

Also, If I open a web browser to http://hostname:port/Jackrabbit I can  
see the "Apache Jackrabbit JCR Server" web page.

I don't see anything to indicate that the request is being handled by  
the dav-servlet, meaning that nothing appears in any logs other than  
the jetty server request log when I try to connect.

On Jun 10, 2008, at 8:46 AM, Angela Schreiber wrote:

> Wade Girard wrote:
>> In the Webdav servlet definition, I set the resource-path-prefix  
>> value to '/' rather than 'repository'.
>> Then, when I tried to connect using cadaver I got the following  
>> response
>> dav:!> open http://hostname:port/Jackrabbit/MyRepository
>> Could not access /Jackrabbit/MyRepository/ (not WebDAV-enabled?):
>> 501 Method PROPFIND is not defined in RFC 2068 and is not supported  
>> by the Servlet API
>> Connection to `hostname' closed.
>
> could it be that the request is not handled by the dav-servlet?
> can you check that? thanks.
>
> angela

Wade Girard
wade.girard@gmail.com






Re: Configuring workspace in Standard WEBDAV

Posted by Angela Schreiber <an...@day.com>.
Wade Girard wrote:
> In the Webdav servlet definition, I set the resource-path-prefix value 
> to '/' rather than 'repository'.
> 
> Then, when I tried to connect using cadaver I got the following response
> 
> dav:!> open http://hostname:port/Jackrabbit/MyRepository
> Could not access /Jackrabbit/MyRepository/ (not WebDAV-enabled?):
> 501 Method PROPFIND is not defined in RFC 2068 and is not supported by 
> the Servlet API
> Connection to `hostname' closed.

could it be that the request is not handled by the dav-servlet?
can you check that? thanks.

angela

Re: Configuring workspace in Standard WEBDAV

Posted by Wade Girard <wa...@comcast.net>.
In the Webdav servlet definition, I set the resource-path-prefix value  
to '/' rather than 'repository'.

Then, when I tried to connect using cadaver I got the following response

dav:!> open http://hostname:port/Jackrabbit/MyRepository
Could not access /Jackrabbit/MyRepository/ (not WebDAV-enabled?):
501 Method PROPFIND is not defined in RFC 2068 and is not supported by  
the Servlet API
Connection to `hostname' closed.

Before, when the value of the resource-path-prefix was '/repository' I  
was able to connect to http://hostname:port/Jackrabbit/repository/ 
MyRepository without any problems.


On Jun 10, 2008, at 1:52 AM, Angela Schreiber wrote:

>
>> So, in the end, I "ideally" want the config in jetty to set the  
>> mapping to "/MyRepository", but I need to configure the jackrabbit  
>> webapp will not require /repository.
>
> that's a prefix defined in the web.xml
>
> kind regards
> angela

Wade Girard
wade.girard@gmail.com






Re: Configuring workspace in Standard WEBDAV

Posted by Angela Schreiber <an...@day.com>.
> So, in the end, I "ideally" want the config in jetty to set the mapping 
> to "/MyRepository", but I need to configure the jackrabbit webapp will 
> not require /repository.

that's a prefix defined in the web.xml

kind regards
angela