You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by alon salant <as...@gmail.com> on 2004/09/01 10:21:13 UTC
Re: Can WebDAV servlet serve non-slide-managed filesystem?
Deploying an additional scope seems to work fine.
It looks like I need to implement both RevisionDescriptorStore and
RevisionDescriptorsStore. Deploying with the Transient versions
deployed fine, but when trying to browse with the XP webdav client, I
got RevisionNotFoundExceptions for the uri of the resource.
So I tried just implementing
RevisionDescriptorsStore.retrieveRevisionDescriptors( ) as it is in
the JNDIPrincipalStore, but then I got Exceptions from
TransientDescriptorStore which seems to depend on the existence of
TransientDescriptorsStore (not sure about that one).
So I stubbed out both RevisionDescriptorStore and
RevisionDescriptorsStore. It looks like I need to implement
RevisionDescriptorStore.retrieveRevisionDescriptor( ). I implemented a
simple version that returns a new NodeRevisionDescriptor with its date
properties set. My /files node shows up as a 0 byte file in my webdav
browser, not a folder.
I am not sure about how to propertly create a NodeRevisionDescriptor -
which properties should be set folders, and which for files. Any
hints?
Am I off track here?
Alon
On Tue, 31 Aug 2004 09:10:36 -0700, James Mason <ma...@apache.org> wrote:
> alon,
> Sorry I didn't think of this earlier. It will probably be easier, at
> least initialy, to have two store configured in your domain. Leave the
> default store in place with a <scope> of "/", and add your store with a
> scope of "/files". This way you won't have to mess with the <data>
> section of the domain, and you won't have to worry about returning
> ActionNodes.
>
> Once you have your store working you can decide how you want to handle
> the other information. It will probably be simplest to setup some basic
> permissions in your domain then map the webdav servlet to only server
> the /files node, but other options are available.
>
> -James
>
>
>
> alon salant wrote:
> > Okay, I've partially answered one of my questions.
> >
> > Playing around and reading the config more carefully, I replaced the
> > sample data element configuration with
> >
> > <data>
> > <objectnode classname="org.apache.slide.structure.SubjectNode" uri="/">
> > <permission action="all" subject="all" inheritable="true"/>
> > </objectnode>
> > </data>
> >
> > and can now directory browse through the webdav servlet. All I see is
> > an empty root directory which is what I expect based on my initial
> > SimpleFileStore implementation.
> >
> > Mapping a web folder from win xp is claiming that "the folder you
> > entered does not appear to be valid" but I have not looked in to this
> > yet.
> >
> > I am curious to know what of of the namespace configuration element is
> > required for what I am trying to do.
> >
> > Alon
> >
> > On Tue, 31 Aug 2004 00:06:29 -0700, alon salant <as...@gmail.com> wrote:
> >
> >>I've decided to take an initial step of stubbing out my
> >>SimpleFileStore implementation and deploying it in my webapp.
> >>
> >>I started with the Domain.sample file from the 2.1b1 distribution and
> >>modified the namespace definition as follows:
> >>
> >><definition>
> >> <store name="files">
> >> <nodestore classname="photospace.slide.SimpleFileStore">
> >> <parameter name="rootpath">store/metadata</parameter>
> >> </nodestore>
> >> <contentstore classname="photospace.slide.SimpleFileStore">
> >> <parameter name="rootpath">store/content</parameter>
> >> </contentstore>
> >> <securitystore
> >>classname="org.apache.slide.store.mem.TransientSecurityStore"/>
> >> <lockstore classname="org.apache.slide.store.mem.TransientLockStore"/>
> >> <revisiondescriptorsstore
> >>classname="org.apache.slide.store.mem.TransientDescriptorsStore"/>
> >> <revisiondescriptorstore
> >>classname="org.apache.slide.store.mem.TransientDescriptorStore"/>
> >> </store>
> >> <scope match="/" store="files"/>
> >></definition>
> >>
> >>SimpleFileStore implements NodeStore and ContentStore. This
> >>configuration deploys without error.
> >>
> >>
> >>>>Is SubjectNode an
> >>>>appropriate ObjectNode implementation to return from retrieveObject(
> >>>>)?
> >>>
> >>>Yes.
> >>
> >>I did find that retrieveObject( ) needs to return an ActionNode not
> >>SubjectNode for NamespaceConfig.getActionNode( ) which was being
> >>called in slide startup. I was getting a ClassCastException. So should
> >>I always return an ActionNode from retrieveObject( )? What's the
> >>difference from a SubjectNode?
> >>
> >>I have the slide WebDAV servlet configured and starting up without
> >>errors and with directory browsing turned on. However, when I browse
> >>to the servlet url, I get a 403 and a single log line from slide:
> >>
> >> http-8080-Processor25, 30-Aug-2004 23:43:47, unauthenticated, GET,
> >>403 "Forbidden", 47 ms, /
> >>
> >>Note that I have not removed the sample namespace configuration or
> >>data from the Domain.sample file that I started with. Reading this
> >>file, I'm not sure what is necessary and what does not apply. I'm
> >>guessing that most of the configuration is necessary and that the info
> >>in the data element can go. Correct?
> >>
> >>Any thoughts on how to get past my 403?
> >>
> >>Alon
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: slide-user-help@jakarta.apache.org
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: Can WebDAV servlet serve non-slide-managed filesystem?
Posted by James Mason <ma...@apache.org>.
It sounds like the acl might be getting messed up somehow. You can check
this by using the command line client to execute the acl method on a
resource in your Store.
A quick fix would probably be to disable security in your
slide.properties file. Unless you're maintaining a list of users and
roles in Slide having security on is rather meaningless. This won't
actually fix the problem, but it should make it go away :).
You can also turn versioning off if you don't need it. That speeds
things up a little too.
-James
alon salant wrote:
> Alright. Lots of progress now.
>
> I've pretty much got things working. I first got a "virtual" store
> working - implemented a few of the store interface methods to support
> webdav browsing through a node structure simply defined in code.
> Definitely took a bit of fiddling to figure out what need to be
> returned for retrieveRevisionDescriptors and
> retrieveRevisionDescriptor but finally got it all set.
>
> I removed all access restrictions with an <objectnode> entry in <data>:
>
> <objectnode classname="org.apache.slide.structure.SubjectNode" uri="/simple">
> <permission action="all" subject="all" inheritable="true"/>
> </objectnode>
>
> Nice.
>
>>>From here it actually was straight forward to call to the filesystem
> to implement the needed read/write/delete implementations.
>
> But I am now finding that I get "Forbidden" messages from the WebDAV
> servlet for PUT, DELETE, MOVE, MKCOL methods. The only methods in my
> implementation that are being called when these WebDAV methods are
> executing are retrieveOject, retrieveRevisionDescriptor,
> retrieveRevisionDescriptors. Could it be something in the
> NodeRevisionDescriptor that I am/am not creating that is preventing
> this or is it authentication/ACL configuration of some kind? Do I need
> to set the owner on the NodeRevisionDescriptor?
>
> I get the same behavior when I map my store to the /files
> configuration in the Domain.sample file. But with /files mapped as it
> comes in Domain.sample, I do not have the same permissions problem.
>
> Do I need to exclude the scope of my store from version control in Domain.xml?
>
> I've been stepping through the code and there are tons of checks to
> SecurityImpl.checkPermissions( ) sometimes I see my config (listed
> above) in there.
>
> Alon
>
> On Wed, 01 Sep 2004 23:10:38 -0700, James Mason <ma...@apache.org> wrote:
>
>>Forgot to point out that the value of resourcetype should be
>>"<collection/>".
>>
>>-James
>>
>>
>>
>>James Mason wrote:
>>
>>>'twould be nice were this easier (or at least better documented). It
>>>looks like you're on the right track, though.
>>>
>>>I think you'll need to set the DAV:resourcetype property at a minimum.
>>>Relevant line from JNDIPrincipalStore:
>>>
>>>props.put(
>>> "DAV:resourcetype",
>>> new NodeProperty("resourcetype", resourceType, "DAV:", "", false));
>>>
>>>I'm not positive, but I think the key for the hashtable (props) is
>>>significant.
>>>
>>>Other than that there are a few properties you'll probably want to
>>>return for files (size, modification date, etc).
>>>
>>>-James
>>>
>>>alon salant wrote:
>>>
>>>
>>>>Deploying an additional scope seems to work fine.
>>>>
>>>>It looks like I need to implement both RevisionDescriptorStore and
>>>>RevisionDescriptorsStore. Deploying with the Transient versions
>>>>deployed fine, but when trying to browse with the XP webdav client, I
>>>>got RevisionNotFoundExceptions for the uri of the resource.
>>>>
>>>>So I tried just implementing
>>>>RevisionDescriptorsStore.retrieveRevisionDescriptors( ) as it is in
>>>>the JNDIPrincipalStore, but then I got Exceptions from
>>>>TransientDescriptorStore which seems to depend on the existence of
>>>>TransientDescriptorsStore (not sure about that one).
>>>>
>>>>So I stubbed out both RevisionDescriptorStore and
>>>>RevisionDescriptorsStore. It looks like I need to implement
>>>>RevisionDescriptorStore.retrieveRevisionDescriptor( ). I implemented a
>>>>simple version that returns a new NodeRevisionDescriptor with its date
>>>>properties set. My /files node shows up as a 0 byte file in my webdav
>>>>browser, not a folder.
>>>>
>>>>I am not sure about how to propertly create a NodeRevisionDescriptor -
>>>>which properties should be set folders, and which for files. Any
>>>>hints?
>>>>
>>>>Am I off track here?
>>>>
>>>>Alon
>>>>
>>>>On Tue, 31 Aug 2004 09:10:36 -0700, James Mason <ma...@apache.org>
>>>>wrote:
>>>>
>>>>
>>>>>alon,
>>>>>Sorry I didn't think of this earlier. It will probably be easier, at
>>>>>least initialy, to have two store configured in your domain. Leave the
>>>>>default store in place with a <scope> of "/", and add your store with a
>>>>>scope of "/files". This way you won't have to mess with the <data>
>>>>>section of the domain, and you won't have to worry about returning
>>>>>ActionNodes.
>>>>>
>>>>>Once you have your store working you can decide how you want to handle
>>>>>the other information. It will probably be simplest to setup some basic
>>>>>permissions in your domain then map the webdav servlet to only server
>>>>>the /files node, but other options are available.
>>>>>
>>>>>-James
>>>>>
>>>>>
>>>>>
>>>>>alon salant wrote:
>>>>>
>>>>>
>>>>>>Okay, I've partially answered one of my questions.
>>>>>>
>>>>>>Playing around and reading the config more carefully, I replaced the
>>>>>>sample data element configuration with
>>>>>>
>>>>>><data>
>>>>>> <objectnode classname="org.apache.slide.structure.SubjectNode"
>>>>>>uri="/">
>>>>>> <permission action="all" subject="all" inheritable="true"/>
>>>>>> </objectnode>
>>>>>></data>
>>>>>>
>>>>>>and can now directory browse through the webdav servlet. All I see is
>>>>>>an empty root directory which is what I expect based on my initial
>>>>>>SimpleFileStore implementation.
>>>>>>
>>>>>>Mapping a web folder from win xp is claiming that "the folder you
>>>>>>entered does not appear to be valid" but I have not looked in to this
>>>>>>yet.
>>>>>>
>>>>>>I am curious to know what of of the namespace configuration element is
>>>>>>required for what I am trying to do.
>>>>>>
>>>>>>Alon
>>>>>>
>>>>>>On Tue, 31 Aug 2004 00:06:29 -0700, alon salant <as...@gmail.com>
>>>>>>wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>I've decided to take an initial step of stubbing out my
>>>>>>>SimpleFileStore implementation and deploying it in my webapp.
>>>>>>>
>>>>>>>I started with the Domain.sample file from the 2.1b1 distribution and
>>>>>>>modified the namespace definition as follows:
>>>>>>>
>>>>>>><definition>
>>>>>>><store name="files">
>>>>>>> <nodestore classname="photospace.slide.SimpleFileStore">
>>>>>>> <parameter name="rootpath">store/metadata</parameter>
>>>>>>> </nodestore>
>>>>>>> <contentstore classname="photospace.slide.SimpleFileStore">
>>>>>>> <parameter name="rootpath">store/content</parameter>
>>>>>>> </contentstore>
>>>>>>> <securitystore
>>>>>>>classname="org.apache.slide.store.mem.TransientSecurityStore"/>
>>>>>>> <lockstore
>>>>>>>classname="org.apache.slide.store.mem.TransientLockStore"/>
>>>>>>> <revisiondescriptorsstore
>>>>>>>classname="org.apache.slide.store.mem.TransientDescriptorsStore"/>
>>>>>>> <revisiondescriptorstore
>>>>>>>classname="org.apache.slide.store.mem.TransientDescriptorStore"/>
>>>>>>></store>
>>>>>>><scope match="/" store="files"/>
>>>>>>></definition>
>>>>>>>
>>>>>>>SimpleFileStore implements NodeStore and ContentStore. This
>>>>>>>configuration deploys without error.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>Is SubjectNode an
>>>>>>>>>appropriate ObjectNode implementation to return from retrieveObject(
>>>>>>>>>)?
>>>>>>>>
>>>>>>>>
>>>>>>>>Yes.
>>>>>>>
>>>>>>>
>>>>>>>I did find that retrieveObject( ) needs to return an ActionNode not
>>>>>>>SubjectNode for NamespaceConfig.getActionNode( ) which was being
>>>>>>>called in slide startup. I was getting a ClassCastException. So should
>>>>>>>I always return an ActionNode from retrieveObject( )? What's the
>>>>>>>difference from a SubjectNode?
>>>>>>>
>>>>>>>I have the slide WebDAV servlet configured and starting up without
>>>>>>>errors and with directory browsing turned on. However, when I browse
>>>>>>>to the servlet url, I get a 403 and a single log line from slide:
>>>>>>>
>>>>>>>http-8080-Processor25, 30-Aug-2004 23:43:47, unauthenticated, GET,
>>>>>>>403 "Forbidden", 47 ms, /
>>>>>>>
>>>>>>>Note that I have not removed the sample namespace configuration or
>>>>>>>data from the Domain.sample file that I started with. Reading this
>>>>>>>file, I'm not sure what is necessary and what does not apply. I'm
>>>>>>>guessing that most of the configuration is necessary and that the info
>>>>>>>in the data element can go. Correct?
>>>>>>>
>>>>>>>Any thoughts on how to get past my 403?
>>>>>>>
>>>>>>>Alon
>>>>>>>
>>>>>>
>>>>>>
>>>>>>---------------------------------------------------------------------
>>>>>>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>>>>>>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>>>>>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>>
>>>
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: Can WebDAV servlet serve non-slide-managed filesystem?
Posted by alon salant <as...@gmail.com>.
Alright. Lots of progress now.
I've pretty much got things working. I first got a "virtual" store
working - implemented a few of the store interface methods to support
webdav browsing through a node structure simply defined in code.
Definitely took a bit of fiddling to figure out what need to be
returned for retrieveRevisionDescriptors and
retrieveRevisionDescriptor but finally got it all set.
I removed all access restrictions with an <objectnode> entry in <data>:
<objectnode classname="org.apache.slide.structure.SubjectNode" uri="/simple">
<permission action="all" subject="all" inheritable="true"/>
</objectnode>
Nice.
>From here it actually was straight forward to call to the filesystem
to implement the needed read/write/delete implementations.
But I am now finding that I get "Forbidden" messages from the WebDAV
servlet for PUT, DELETE, MOVE, MKCOL methods. The only methods in my
implementation that are being called when these WebDAV methods are
executing are retrieveOject, retrieveRevisionDescriptor,
retrieveRevisionDescriptors. Could it be something in the
NodeRevisionDescriptor that I am/am not creating that is preventing
this or is it authentication/ACL configuration of some kind? Do I need
to set the owner on the NodeRevisionDescriptor?
I get the same behavior when I map my store to the /files
configuration in the Domain.sample file. But with /files mapped as it
comes in Domain.sample, I do not have the same permissions problem.
Do I need to exclude the scope of my store from version control in Domain.xml?
I've been stepping through the code and there are tons of checks to
SecurityImpl.checkPermissions( ) sometimes I see my config (listed
above) in there.
Alon
On Wed, 01 Sep 2004 23:10:38 -0700, James Mason <ma...@apache.org> wrote:
> Forgot to point out that the value of resourcetype should be
> "<collection/>".
>
> -James
>
>
>
> James Mason wrote:
> > 'twould be nice were this easier (or at least better documented). It
> > looks like you're on the right track, though.
> >
> > I think you'll need to set the DAV:resourcetype property at a minimum.
> > Relevant line from JNDIPrincipalStore:
> >
> > props.put(
> > "DAV:resourcetype",
> > new NodeProperty("resourcetype", resourceType, "DAV:", "", false));
> >
> > I'm not positive, but I think the key for the hashtable (props) is
> > significant.
> >
> > Other than that there are a few properties you'll probably want to
> > return for files (size, modification date, etc).
> >
> > -James
> >
> > alon salant wrote:
> >
> >> Deploying an additional scope seems to work fine.
> >>
> >> It looks like I need to implement both RevisionDescriptorStore and
> >> RevisionDescriptorsStore. Deploying with the Transient versions
> >> deployed fine, but when trying to browse with the XP webdav client, I
> >> got RevisionNotFoundExceptions for the uri of the resource.
> >>
> >> So I tried just implementing
> >> RevisionDescriptorsStore.retrieveRevisionDescriptors( ) as it is in
> >> the JNDIPrincipalStore, but then I got Exceptions from
> >> TransientDescriptorStore which seems to depend on the existence of
> >> TransientDescriptorsStore (not sure about that one).
> >>
> >> So I stubbed out both RevisionDescriptorStore and
> >> RevisionDescriptorsStore. It looks like I need to implement
> >> RevisionDescriptorStore.retrieveRevisionDescriptor( ). I implemented a
> >> simple version that returns a new NodeRevisionDescriptor with its date
> >> properties set. My /files node shows up as a 0 byte file in my webdav
> >> browser, not a folder.
> >>
> >> I am not sure about how to propertly create a NodeRevisionDescriptor -
> >> which properties should be set folders, and which for files. Any
> >> hints?
> >>
> >> Am I off track here?
> >>
> >> Alon
> >>
> >> On Tue, 31 Aug 2004 09:10:36 -0700, James Mason <ma...@apache.org>
> >> wrote:
> >>
> >>> alon,
> >>> Sorry I didn't think of this earlier. It will probably be easier, at
> >>> least initialy, to have two store configured in your domain. Leave the
> >>> default store in place with a <scope> of "/", and add your store with a
> >>> scope of "/files". This way you won't have to mess with the <data>
> >>> section of the domain, and you won't have to worry about returning
> >>> ActionNodes.
> >>>
> >>> Once you have your store working you can decide how you want to handle
> >>> the other information. It will probably be simplest to setup some basic
> >>> permissions in your domain then map the webdav servlet to only server
> >>> the /files node, but other options are available.
> >>>
> >>> -James
> >>>
> >>>
> >>>
> >>> alon salant wrote:
> >>>
> >>>> Okay, I've partially answered one of my questions.
> >>>>
> >>>> Playing around and reading the config more carefully, I replaced the
> >>>> sample data element configuration with
> >>>>
> >>>> <data>
> >>>> <objectnode classname="org.apache.slide.structure.SubjectNode"
> >>>> uri="/">
> >>>> <permission action="all" subject="all" inheritable="true"/>
> >>>> </objectnode>
> >>>> </data>
> >>>>
> >>>> and can now directory browse through the webdav servlet. All I see is
> >>>> an empty root directory which is what I expect based on my initial
> >>>> SimpleFileStore implementation.
> >>>>
> >>>> Mapping a web folder from win xp is claiming that "the folder you
> >>>> entered does not appear to be valid" but I have not looked in to this
> >>>> yet.
> >>>>
> >>>> I am curious to know what of of the namespace configuration element is
> >>>> required for what I am trying to do.
> >>>>
> >>>> Alon
> >>>>
> >>>> On Tue, 31 Aug 2004 00:06:29 -0700, alon salant <as...@gmail.com>
> >>>> wrote:
> >>>>
> >>>>
> >>>>> I've decided to take an initial step of stubbing out my
> >>>>> SimpleFileStore implementation and deploying it in my webapp.
> >>>>>
> >>>>> I started with the Domain.sample file from the 2.1b1 distribution and
> >>>>> modified the namespace definition as follows:
> >>>>>
> >>>>> <definition>
> >>>>> <store name="files">
> >>>>> <nodestore classname="photospace.slide.SimpleFileStore">
> >>>>> <parameter name="rootpath">store/metadata</parameter>
> >>>>> </nodestore>
> >>>>> <contentstore classname="photospace.slide.SimpleFileStore">
> >>>>> <parameter name="rootpath">store/content</parameter>
> >>>>> </contentstore>
> >>>>> <securitystore
> >>>>> classname="org.apache.slide.store.mem.TransientSecurityStore"/>
> >>>>> <lockstore
> >>>>> classname="org.apache.slide.store.mem.TransientLockStore"/>
> >>>>> <revisiondescriptorsstore
> >>>>> classname="org.apache.slide.store.mem.TransientDescriptorsStore"/>
> >>>>> <revisiondescriptorstore
> >>>>> classname="org.apache.slide.store.mem.TransientDescriptorStore"/>
> >>>>> </store>
> >>>>> <scope match="/" store="files"/>
> >>>>> </definition>
> >>>>>
> >>>>> SimpleFileStore implements NodeStore and ContentStore. This
> >>>>> configuration deploys without error.
> >>>>>
> >>>>>
> >>>>>
> >>>>>>> Is SubjectNode an
> >>>>>>> appropriate ObjectNode implementation to return from retrieveObject(
> >>>>>>> )?
> >>>>>>
> >>>>>>
> >>>>>> Yes.
> >>>>>
> >>>>>
> >>>>> I did find that retrieveObject( ) needs to return an ActionNode not
> >>>>> SubjectNode for NamespaceConfig.getActionNode( ) which was being
> >>>>> called in slide startup. I was getting a ClassCastException. So should
> >>>>> I always return an ActionNode from retrieveObject( )? What's the
> >>>>> difference from a SubjectNode?
> >>>>>
> >>>>> I have the slide WebDAV servlet configured and starting up without
> >>>>> errors and with directory browsing turned on. However, when I browse
> >>>>> to the servlet url, I get a 403 and a single log line from slide:
> >>>>>
> >>>>> http-8080-Processor25, 30-Aug-2004 23:43:47, unauthenticated, GET,
> >>>>> 403 "Forbidden", 47 ms, /
> >>>>>
> >>>>> Note that I have not removed the sample namespace configuration or
> >>>>> data from the Domain.sample file that I started with. Reading this
> >>>>> file, I'm not sure what is necessary and what does not apply. I'm
> >>>>> guessing that most of the configuration is necessary and that the info
> >>>>> in the data element can go. Correct?
> >>>>>
> >>>>> Any thoughts on how to get past my 403?
> >>>>>
> >>>>> Alon
> >>>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> >>>> For additional commands, e-mail: slide-user-help@jakarta.apache.org
> >>>>
> >>>>
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> >>> For additional commands, e-mail: slide-user-help@jakarta.apache.org
> >>>
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: slide-user-help@jakarta.apache.org
> >>
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: slide-user-help@jakarta.apache.org
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: Can WebDAV servlet serve non-slide-managed filesystem?
Posted by James Mason <ma...@apache.org>.
Forgot to point out that the value of resourcetype should be
"<collection/>".
-James
James Mason wrote:
> 'twould be nice were this easier (or at least better documented). It
> looks like you're on the right track, though.
>
> I think you'll need to set the DAV:resourcetype property at a minimum.
> Relevant line from JNDIPrincipalStore:
>
> props.put(
> "DAV:resourcetype",
> new NodeProperty("resourcetype", resourceType, "DAV:", "", false));
>
> I'm not positive, but I think the key for the hashtable (props) is
> significant.
>
> Other than that there are a few properties you'll probably want to
> return for files (size, modification date, etc).
>
> -James
>
> alon salant wrote:
>
>> Deploying an additional scope seems to work fine.
>>
>> It looks like I need to implement both RevisionDescriptorStore and
>> RevisionDescriptorsStore. Deploying with the Transient versions
>> deployed fine, but when trying to browse with the XP webdav client, I
>> got RevisionNotFoundExceptions for the uri of the resource.
>>
>> So I tried just implementing
>> RevisionDescriptorsStore.retrieveRevisionDescriptors( ) as it is in
>> the JNDIPrincipalStore, but then I got Exceptions from
>> TransientDescriptorStore which seems to depend on the existence of
>> TransientDescriptorsStore (not sure about that one).
>>
>> So I stubbed out both RevisionDescriptorStore and
>> RevisionDescriptorsStore. It looks like I need to implement
>> RevisionDescriptorStore.retrieveRevisionDescriptor( ). I implemented a
>> simple version that returns a new NodeRevisionDescriptor with its date
>> properties set. My /files node shows up as a 0 byte file in my webdav
>> browser, not a folder.
>>
>> I am not sure about how to propertly create a NodeRevisionDescriptor -
>> which properties should be set folders, and which for files. Any
>> hints?
>>
>> Am I off track here?
>>
>> Alon
>>
>> On Tue, 31 Aug 2004 09:10:36 -0700, James Mason <ma...@apache.org>
>> wrote:
>>
>>> alon,
>>> Sorry I didn't think of this earlier. It will probably be easier, at
>>> least initialy, to have two store configured in your domain. Leave the
>>> default store in place with a <scope> of "/", and add your store with a
>>> scope of "/files". This way you won't have to mess with the <data>
>>> section of the domain, and you won't have to worry about returning
>>> ActionNodes.
>>>
>>> Once you have your store working you can decide how you want to handle
>>> the other information. It will probably be simplest to setup some basic
>>> permissions in your domain then map the webdav servlet to only server
>>> the /files node, but other options are available.
>>>
>>> -James
>>>
>>>
>>>
>>> alon salant wrote:
>>>
>>>> Okay, I've partially answered one of my questions.
>>>>
>>>> Playing around and reading the config more carefully, I replaced the
>>>> sample data element configuration with
>>>>
>>>> <data>
>>>> <objectnode classname="org.apache.slide.structure.SubjectNode"
>>>> uri="/">
>>>> <permission action="all" subject="all" inheritable="true"/>
>>>> </objectnode>
>>>> </data>
>>>>
>>>> and can now directory browse through the webdav servlet. All I see is
>>>> an empty root directory which is what I expect based on my initial
>>>> SimpleFileStore implementation.
>>>>
>>>> Mapping a web folder from win xp is claiming that "the folder you
>>>> entered does not appear to be valid" but I have not looked in to this
>>>> yet.
>>>>
>>>> I am curious to know what of of the namespace configuration element is
>>>> required for what I am trying to do.
>>>>
>>>> Alon
>>>>
>>>> On Tue, 31 Aug 2004 00:06:29 -0700, alon salant <as...@gmail.com>
>>>> wrote:
>>>>
>>>>
>>>>> I've decided to take an initial step of stubbing out my
>>>>> SimpleFileStore implementation and deploying it in my webapp.
>>>>>
>>>>> I started with the Domain.sample file from the 2.1b1 distribution and
>>>>> modified the namespace definition as follows:
>>>>>
>>>>> <definition>
>>>>> <store name="files">
>>>>> <nodestore classname="photospace.slide.SimpleFileStore">
>>>>> <parameter name="rootpath">store/metadata</parameter>
>>>>> </nodestore>
>>>>> <contentstore classname="photospace.slide.SimpleFileStore">
>>>>> <parameter name="rootpath">store/content</parameter>
>>>>> </contentstore>
>>>>> <securitystore
>>>>> classname="org.apache.slide.store.mem.TransientSecurityStore"/>
>>>>> <lockstore
>>>>> classname="org.apache.slide.store.mem.TransientLockStore"/>
>>>>> <revisiondescriptorsstore
>>>>> classname="org.apache.slide.store.mem.TransientDescriptorsStore"/>
>>>>> <revisiondescriptorstore
>>>>> classname="org.apache.slide.store.mem.TransientDescriptorStore"/>
>>>>> </store>
>>>>> <scope match="/" store="files"/>
>>>>> </definition>
>>>>>
>>>>> SimpleFileStore implements NodeStore and ContentStore. This
>>>>> configuration deploys without error.
>>>>>
>>>>>
>>>>>
>>>>>>> Is SubjectNode an
>>>>>>> appropriate ObjectNode implementation to return from retrieveObject(
>>>>>>> )?
>>>>>>
>>>>>>
>>>>>> Yes.
>>>>>
>>>>>
>>>>> I did find that retrieveObject( ) needs to return an ActionNode not
>>>>> SubjectNode for NamespaceConfig.getActionNode( ) which was being
>>>>> called in slide startup. I was getting a ClassCastException. So should
>>>>> I always return an ActionNode from retrieveObject( )? What's the
>>>>> difference from a SubjectNode?
>>>>>
>>>>> I have the slide WebDAV servlet configured and starting up without
>>>>> errors and with directory browsing turned on. However, when I browse
>>>>> to the servlet url, I get a 403 and a single log line from slide:
>>>>>
>>>>> http-8080-Processor25, 30-Aug-2004 23:43:47, unauthenticated, GET,
>>>>> 403 "Forbidden", 47 ms, /
>>>>>
>>>>> Note that I have not removed the sample namespace configuration or
>>>>> data from the Domain.sample file that I started with. Reading this
>>>>> file, I'm not sure what is necessary and what does not apply. I'm
>>>>> guessing that most of the configuration is necessary and that the info
>>>>> in the data element can go. Correct?
>>>>>
>>>>> Any thoughts on how to get past my 403?
>>>>>
>>>>> Alon
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: Can WebDAV servlet serve non-slide-managed filesystem?
Posted by James Mason <ma...@apache.org>.
'twould be nice were this easier (or at least better documented). It
looks like you're on the right track, though.
I think you'll need to set the DAV:resourcetype property at a minimum.
Relevant line from JNDIPrincipalStore:
props.put(
"DAV:resourcetype",
new NodeProperty("resourcetype", resourceType, "DAV:", "", false));
I'm not positive, but I think the key for the hashtable (props) is
significant.
Other than that there are a few properties you'll probably want to
return for files (size, modification date, etc).
-James
alon salant wrote:
> Deploying an additional scope seems to work fine.
>
> It looks like I need to implement both RevisionDescriptorStore and
> RevisionDescriptorsStore. Deploying with the Transient versions
> deployed fine, but when trying to browse with the XP webdav client, I
> got RevisionNotFoundExceptions for the uri of the resource.
>
> So I tried just implementing
> RevisionDescriptorsStore.retrieveRevisionDescriptors( ) as it is in
> the JNDIPrincipalStore, but then I got Exceptions from
> TransientDescriptorStore which seems to depend on the existence of
> TransientDescriptorsStore (not sure about that one).
>
> So I stubbed out both RevisionDescriptorStore and
> RevisionDescriptorsStore. It looks like I need to implement
> RevisionDescriptorStore.retrieveRevisionDescriptor( ). I implemented a
> simple version that returns a new NodeRevisionDescriptor with its date
> properties set. My /files node shows up as a 0 byte file in my webdav
> browser, not a folder.
>
> I am not sure about how to propertly create a NodeRevisionDescriptor -
> which properties should be set folders, and which for files. Any
> hints?
>
> Am I off track here?
>
> Alon
>
> On Tue, 31 Aug 2004 09:10:36 -0700, James Mason <ma...@apache.org> wrote:
>
>>alon,
>>Sorry I didn't think of this earlier. It will probably be easier, at
>>least initialy, to have two store configured in your domain. Leave the
>>default store in place with a <scope> of "/", and add your store with a
>>scope of "/files". This way you won't have to mess with the <data>
>>section of the domain, and you won't have to worry about returning
>>ActionNodes.
>>
>>Once you have your store working you can decide how you want to handle
>>the other information. It will probably be simplest to setup some basic
>>permissions in your domain then map the webdav servlet to only server
>>the /files node, but other options are available.
>>
>>-James
>>
>>
>>
>>alon salant wrote:
>>
>>>Okay, I've partially answered one of my questions.
>>>
>>>Playing around and reading the config more carefully, I replaced the
>>>sample data element configuration with
>>>
>>><data>
>>> <objectnode classname="org.apache.slide.structure.SubjectNode" uri="/">
>>> <permission action="all" subject="all" inheritable="true"/>
>>> </objectnode>
>>></data>
>>>
>>>and can now directory browse through the webdav servlet. All I see is
>>>an empty root directory which is what I expect based on my initial
>>>SimpleFileStore implementation.
>>>
>>>Mapping a web folder from win xp is claiming that "the folder you
>>>entered does not appear to be valid" but I have not looked in to this
>>>yet.
>>>
>>>I am curious to know what of of the namespace configuration element is
>>>required for what I am trying to do.
>>>
>>>Alon
>>>
>>>On Tue, 31 Aug 2004 00:06:29 -0700, alon salant <as...@gmail.com> wrote:
>>>
>>>
>>>>I've decided to take an initial step of stubbing out my
>>>>SimpleFileStore implementation and deploying it in my webapp.
>>>>
>>>>I started with the Domain.sample file from the 2.1b1 distribution and
>>>>modified the namespace definition as follows:
>>>>
>>>><definition>
>>>> <store name="files">
>>>> <nodestore classname="photospace.slide.SimpleFileStore">
>>>> <parameter name="rootpath">store/metadata</parameter>
>>>> </nodestore>
>>>> <contentstore classname="photospace.slide.SimpleFileStore">
>>>> <parameter name="rootpath">store/content</parameter>
>>>> </contentstore>
>>>> <securitystore
>>>>classname="org.apache.slide.store.mem.TransientSecurityStore"/>
>>>> <lockstore classname="org.apache.slide.store.mem.TransientLockStore"/>
>>>> <revisiondescriptorsstore
>>>>classname="org.apache.slide.store.mem.TransientDescriptorsStore"/>
>>>> <revisiondescriptorstore
>>>>classname="org.apache.slide.store.mem.TransientDescriptorStore"/>
>>>> </store>
>>>> <scope match="/" store="files"/>
>>>></definition>
>>>>
>>>>SimpleFileStore implements NodeStore and ContentStore. This
>>>>configuration deploys without error.
>>>>
>>>>
>>>>
>>>>>>Is SubjectNode an
>>>>>>appropriate ObjectNode implementation to return from retrieveObject(
>>>>>>)?
>>>>>
>>>>>Yes.
>>>>
>>>>I did find that retrieveObject( ) needs to return an ActionNode not
>>>>SubjectNode for NamespaceConfig.getActionNode( ) which was being
>>>>called in slide startup. I was getting a ClassCastException. So should
>>>>I always return an ActionNode from retrieveObject( )? What's the
>>>>difference from a SubjectNode?
>>>>
>>>>I have the slide WebDAV servlet configured and starting up without
>>>>errors and with directory browsing turned on. However, when I browse
>>>>to the servlet url, I get a 403 and a single log line from slide:
>>>>
>>>> http-8080-Processor25, 30-Aug-2004 23:43:47, unauthenticated, GET,
>>>>403 "Forbidden", 47 ms, /
>>>>
>>>>Note that I have not removed the sample namespace configuration or
>>>>data from the Domain.sample file that I started with. Reading this
>>>>file, I'm not sure what is necessary and what does not apply. I'm
>>>>guessing that most of the configuration is necessary and that the info
>>>>in the data element can go. Correct?
>>>>
>>>>Any thoughts on how to get past my 403?
>>>>
>>>>Alon
>>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>>
>>>
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org