RE: patch for auto-create-users
When I first looked at slide I assumed it would use servlet container security (I wasn't familiar with the webdav spec). Clearly it can't use j2ee security and conform to the webdav spec. The ideal solution for me would be to have slide authenticate using LDAP and the servlet container use slide for authentication. I'm using Weblogic 8.1 and it is already configured to use LDAP for security so the route of least resistence to get authentication working is to automatically add users authenticated by the serlet container. Unfortunately - like Daniel says - this means the slide user database is out of sync with the LDAP database. To get the LDAP users and roles into slide wouldn't it be slightly more complicated than just writing a store for LDAP (even tough it sounds like this is pretty complicated). I would only want to use the LDAP store for the users and roles directories not the rest of the directories. I would have thought I would need a proxy store that would use the correct underlying store for different directories - LDAP for users and roles and JDBC for the rest, in my case. Another approach might be to import LDAP users and roles into slide and listen for updates on LDAP to keep the two in sync. Could you not make a store read-only by simply making sure no user had any write permissions? -Original Message- From: Martin Holz [mailto:[EMAIL PROTECTED] Sent: 26 April 2004 13:49 To: [EMAIL PROTECTED] Subject: Re: patch for auto-create-users Daniel Florey [EMAIL PROTECTED] writes: Hi, I'd propose to add the methods regarding the user/role stuff to the Security-Interface and the SecurityImpl-class. There already are some methods regarding user/role management (hasRole()...) This is not possible, since the methods need access to ContentImpl et. al. which are not available. Adding those helpers would create cyclic dependencies. In general I think it would be better to have only one place (e.g. LDAP) where users are managed and give slide the ability to access the LDAP-user/roles. This is definitely one way. It can be done right now, if you implement a LDAP store. However mapping LDAP groups to slide groups can be a real pain. As a side note slide has currently no concept of a read only store, which would be really useful here. What if you add a user and auto-create it in slide. After that you grant a permission to this user and delete the user lateron? The user will not be deleted in slide as no auto-delete can be done. So you have an inconsistent user database where some users in slide exist that don't exist in your primary user store anymore. Adding your propsed methods is a good thing anyway as many users might need some simple methods to create users and add roles at slide api level. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: patch for auto-create-users
Mortimore, Jamie [IT] wrote: When I first looked at slide I assumed it would use servlet container security (I wasn't familiar with the webdav spec). Clearly it can't use j2ee security and conform to the webdav spec. The ideal solution for me would be to have slide authenticate using LDAP and the servlet container use slide for authentication. I'm using Weblogic 8.1 and it is already configured to use LDAP for security so the route of least resistence to get authentication working is to automatically add users authenticated by the serlet container. Unfortunately - like Daniel says - this means the slide user database is out of sync with the LDAP database. To get the LDAP users and roles into slide wouldn't it be slightly more complicated than just writing a store for LDAP (even tough it sounds like this is pretty complicated). I would only want to use the LDAP store for the users and roles directories not the rest of the directories. I would have thought I would need a proxy store that would use the correct underlying store for different directories - LDAP for users and roles and JDBC for the rest, in my case. It is possible to assign different stores to different scopes (like mount points), so you don't need the proxy thing. So the main task would be to write a LDAP-store. To have such a store would be really a great thing so that users and roles are stored only in one physical store. If LDAP provides some notification mechanism for informing slide about user/role updates additional user/role caching would be possible to achieve better performance. Regards, Daniel Another approach might be to import LDAP users and roles into slide and listen for updates on LDAP to keep the two in sync. Could you not make a store read-only by simply making sure no user had any write permissions? -Original Message- From: Martin Holz [mailto:[EMAIL PROTECTED] Sent: 26 April 2004 13:49 To: [EMAIL PROTECTED] Subject: Re: patch for auto-create-users Daniel Florey [EMAIL PROTECTED] writes: Hi, I'd propose to add the methods regarding the user/role stuff to the Security-Interface and the SecurityImpl-class. There already are some methods regarding user/role management (hasRole()...) This is not possible, since the methods need access to ContentImpl et. al. which are not available. Adding those helpers would create cyclic dependencies. In general I think it would be better to have only one place (e.g. LDAP) where users are managed and give slide the ability to access the LDAP-user/roles. This is definitely one way. It can be done right now, if you implement a LDAP store. However mapping LDAP groups to slide groups can be a real pain. As a side note slide has currently no concept of a read only store, which would be really useful here. What if you add a user and auto-create it in slide. After that you grant a permission to this user and delete the user lateron? The user will not be deleted in slide as no auto-delete can be done. So you have an inconsistent user database where some users in slide exist that don't exist in your primary user store anymore. Adding your propsed methods is a good thing anyway as many users might need some simple methods to create users and add roles at slide api level. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
slide command line client and authentication
Hi, I have used the slide command line client, and I wanted to know if it's possible to open an authenticated connection with this client. I'd like to know that because I got some Forbidden ... 403 messages, and I wondered how to get the needed rights. Olivier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Controlling Slide cache, was Re: patch for auto-create-users
Hi, Daniel Florey wrote: If LDAP provides some notification mechanism for informing slide about user/role updates additional user/role caching would be possible to achieve better performance. I have a custom store that gets user/role info from an external source. I set it up in the Domain.xml and it's working but Slide caches the objects and do not go to my store to get updated info. I can also detect external updates, but how do I control the caching in Slide? I don't want to disable caching completely. Is there a way to invalidate a cache entry from within my store code? Thanks, Carlos - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Download of files that are larger than 65535 Bytes (63,9K)
Hello everyone, I'm writing a universal module for UP/Downloading files to/from WebDAV repositories. I have encountered the strange problem that only files with the size up to 65535 Bytes are uploaded/downloaded correctly. If a file is larger that only the first 65535 Bytes are uploaded or downloaded. import org.apache.webdav.lib.*; public void downloadDocument(WebdavResource resource, File localFile) throws Exception { if(!resource.isCollection()) { resource.getMethod(localFile); } } can anybody help me? Best, Oleg Rostanin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Download of files that are larger than 65535 Bytes (63,9K)
I have checked the Slide servlet with another client (DAVExplorer). It works correctly. It means the reason must be hiding somwhere in webdav API Oleg Rostanin wrote: Hello everyone, I'm writing a universal module for UP/Downloading files to/from WebDAV repositories. I have encountered the strange problem that only files with the size up to 65535 Bytes are uploaded/downloaded correctly. If a file is larger that only the first 65535 Bytes are uploaded or downloaded. import org.apache.webdav.lib.*; public void downloadDocument(WebdavResource resource, File localFile) throws Exception { if(!resource.isCollection()) { resource.getMethod(localFile); } } can anybody help me? Best, Oleg Rostanin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Controlling Slide cache, was Re: patch for auto-create-users
ExtendedStore allows you to invalidate entries. Subclass it and add your code that talks to your client store to find out which entries to delete. Use something like getTxCache().remove(null, [key to be invalidated] on objectsCache, permissionsCache, etc. Oliver Carlos Villegas wrote: Hi, Daniel Florey wrote: If LDAP provides some notification mechanism for informing slide about user/role updates additional user/role caching would be possible to achieve better performance. I have a custom store that gets user/role info from an external source. I set it up in the Domain.xml and it's working but Slide caches the objects and do not go to my store to get updated info. I can also detect external updates, but how do I control the caching in Slide? I don't want to disable caching completely. Is there a way to invalidate a cache entry from within my store code? Thanks, Carlos - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Download of files that are larger than 65535 Bytes (63,9K)
As said before, please specify which Client version you use. Oliver Oleg Rostanin wrote: I have checked the Slide servlet with another client (DAVExplorer). It works correctly. It means the reason must be hiding somwhere in webdav API Oleg Rostanin wrote: Hello everyone, I'm writing a universal module for UP/Downloading files to/from WebDAV repositories. I have encountered the strange problem that only files with the size up to 65535 Bytes are uploaded/downloaded correctly. If a file is larger that only the first 65535 Bytes are uploaded or downloaded. import org.apache.webdav.lib.*; public void downloadDocument(WebdavResource resource, File localFile) throws Exception { if(!resource.isCollection()) { resource.getMethod(localFile); } } can anybody help me? Best, Oleg Rostanin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Download of files that are larger than 65535 Bytes (63,9K)
I use version SLIDE_2_0_RELEASE_BRANCH_RC1_RELEASE together with sources of the jakarta commons utilities version HTTPCLIENT_2_0_BRANCH Oleg Oliver Zeigermann wrote: As said before, please specify which Client version you use. Oliver Oleg Rostanin wrote: I have checked the Slide servlet with another client (DAVExplorer). It works correctly. It means the reason must be hiding somwhere in webdav API Oleg Rostanin wrote: Hello everyone, I'm writing a universal module for UP/Downloading files to/from WebDAV repositories. I have encountered the strange problem that only files with the size up to 65535 Bytes are uploaded/downloaded correctly. If a file is larger that only the first 65535 Bytes are uploaded or downloaded. import org.apache.webdav.lib.*; public void downloadDocument(WebdavResource resource, File localFile) throws Exception { if(!resource.isCollection()) { resource.getMethod(localFile); } } can anybody help me? Best, Oleg Rostanin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Download of files that are larger than 65535 Bytes (63,9K)
It sounds like you are using MySQL as your content store. Is that correct? From: Oleg Rostanin [EMAIL PROTECTED] Reply-To: Slide Users Mailing List [EMAIL PROTECTED] To: Slide Users Mailing List [EMAIL PROTECTED] Subject: Re: Download of files that are larger than 65535 Bytes (63,9K) Date: Tue, 27 Apr 2004 16:46:08 +0200 I have checked the Slide servlet with another client (DAVExplorer). It works correctly. It means the reason must be hiding somwhere in webdav API Oleg Rostanin wrote: Hello everyone, I'm writing a universal module for UP/Downloading files to/from WebDAV repositories. I have encountered the strange problem that only files with the size up to 65535 Bytes are uploaded/downloaded correctly. If a file is larger that only the first 65535 Bytes are uploaded or downloaded. import org.apache.webdav.lib.*; public void downloadDocument(WebdavResource resource, File localFile) throws Exception { if(!resource.isCollection()) { resource.getMethod(localFile); } } can anybody help me? Best, Oleg Rostanin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Watch LIVE baseball games on your computer with MLB.TV, included with MSN Premium! http://join.msn.com/?page=features/mlbpgmarket=en-us/go/onm00200439ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Download of files that are larger than 65535 Bytes (63,9K)
Yes, it is correct Ryan Rhodes wrote: It sounds like you are using MySQL as your content store. Is that correct? From: Oleg Rostanin [EMAIL PROTECTED] Reply-To: Slide Users Mailing List [EMAIL PROTECTED] To: Slide Users Mailing List [EMAIL PROTECTED] Subject: Re: Download of files that are larger than 65535 Bytes (63,9K) Date: Tue, 27 Apr 2004 16:46:08 +0200 I have checked the Slide servlet with another client (DAVExplorer). It works correctly. It means the reason must be hiding somwhere in webdav API Oleg Rostanin wrote: Hello everyone, I'm writing a universal module for UP/Downloading files to/from WebDAV repositories. I have encountered the strange problem that only files with the size up to 65535 Bytes are uploaded/downloaded correctly. If a file is larger that only the first 65535 Bytes are uploaded or downloaded. import org.apache.webdav.lib.*; public void downloadDocument(WebdavResource resource, File localFile) throws Exception { if(!resource.isCollection()) { resource.getMethod(localFile); } } can anybody help me? Best, Oleg Rostanin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Watch LIVE baseball games on your computer with MLB.TV, included with MSN Premium! http://join.msn.com/?page=features/mlbpgmarket=en-us/go/onm00200439ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: patch for auto-create-users
Daniel Florey wrote: It is possible to assign different stores to different scopes (like mount points), so you don't need the proxy thing. So the main task would be to write a LDAP-store. To have such a store would be really a great thing so that users and roles are stored only in one physical store. If LDAP provides some notification mechanism for informing slide about user/role updates additional user/role caching would be possible to achieve better performance. Regards, Daniel I went through the same progression as Jamie with auto-create-users. It would have been nice to have when I started, but it doesn't add anything now since I ultimately need the LDAP sync'd setup as well. Could you give an idea of just how much effort is involved in creating an LDAP store? I don't know if it makes it any easier, but I only need LDAP for usernames and passwords. I don't really even care if roles are stored in LDAP. Regards, Ryan Rhodes _ Stop worrying about overloading your inbox - get MSN Hotmail Extra Storage! http://join.msn.com/?pgmarket=en-uspage=hotmail/es2ST=1/go/onm00200362ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WebdavResource - creating an empty file (another newbie question)
I never had to deal with the security stuff more than making sure it was working. Maybe someone else in the list will know how to turn it back on...server.xml?? Jeff From: Amr Elssamadisy [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: WebdavResource - creating an empty file (another newbie question) Date: Mon, 26 Apr 2004 21:58:02 -0400 I take that back... I have been playing around with the security constraints and seem to have turned something off Thanks! J H wrote: Did you make sure that test,test are working by going to http://localhost:8080 in your web browser? From: Amr Elssamadisy [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: slide mailing list [EMAIL PROTECTED] Subject: WebdavResource - creating an empty file (another newbie question) Date: Mon, 26 Apr 2004 18:22:43 -0400 Hello everyone, I've been banging my head against this all day and I can't seem to figure out what is wrong. I hope it is obvious to someone with a bit more experience with Webdav (this is an error with both the stable 1.016 and the new release candidate build) Basically - what I get back is an error 403 : Forbidden. Any ideas/directions would be useful. /** * Expecting user name of test/test to allow a correct login and give * write permissions * @throws Exception */ public void testWebdavWrite() throws Exception{ HttpURLhomeUrl = new HttpURL(http://localhost:8080/;); homeUrl.setUserInfo(test,test); WebdavResource res = new WebdavResource(new HttpURL(homeUrl,testFile)); assertFalse(res.exists()); boolean success = res.putMethod(); assertTrue(res.getStatusMessage(),success);//write an empty file } -- Amr Elssamadisy Developer,Researcher,Student (In no particular order...) tel: (413) 207-1225 email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- Amr Elssamadisy Developer,Researcher,Student (In no particular order...) tel: (413) 207-1225 email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ MSN Toolbar provides one-click access to Hotmail from any Web page FREE download! http://toolbar.msn.com/go/onm00200413ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Download of files that are larger than 65535 Bytes (63,9K)
I was intending to put something detailed together on this. The problem is with MySQL 4.0. It only allows BLOB's up to 64k. I have searched everywhere on MySQL lists and could not confirm this, but you will notice that you can't even upload a file greater than 64k using phpmyadmin. I don't know if this is a phpmyadmin problem (I created the tables with phpmyadmin in the first place), a mysql driver problem, or just a problem with 4.0 that has been fixed in 4.x 0. I can't imagine 64k is the correct max for blobs for such a popular database. The solution I used was to change the type of the CONTENT column in the VERSION_CONTENT table from BLOB to LONGBLOB. I can no longer browse this table with phpmyadmin (bug???), but I have tested upload/download with 100 Meg files. Apparently, changing the type to LONGBLOB will break PROPPATCH requests. Stuart MacPherson posted a patch for this sometime back. I have not tested for the problem or applied the patch. I don't think the patch or the change to the table structure ever got into the Slide codebase. --hope this helps Ryan Rhodes From: Oleg Rostanin [EMAIL PROTECTED] Reply-To: Slide Users Mailing List [EMAIL PROTECTED] To: Slide Users Mailing List [EMAIL PROTECTED] Subject: Re: Download of files that are larger than 65535 Bytes (63,9K) Date: Tue, 27 Apr 2004 17:07:42 +0200 Yes, it is correct Ryan Rhodes wrote: It sounds like you are using MySQL as your content store. Is that correct? From: Oleg Rostanin [EMAIL PROTECTED] Reply-To: Slide Users Mailing List [EMAIL PROTECTED] To: Slide Users Mailing List [EMAIL PROTECTED] Subject: Re: Download of files that are larger than 65535 Bytes (63,9K) Date: Tue, 27 Apr 2004 16:46:08 +0200 I have checked the Slide servlet with another client (DAVExplorer). It works correctly. It means the reason must be hiding somwhere in webdav API Oleg Rostanin wrote: Hello everyone, I'm writing a universal module for UP/Downloading files to/from WebDAV repositories. I have encountered the strange problem that only files with the size up to 65535 Bytes are uploaded/downloaded correctly. If a file is larger that only the first 65535 Bytes are uploaded or downloaded. import org.apache.webdav.lib.*; public void downloadDocument(WebdavResource resource, File localFile) throws Exception { if(!resource.isCollection()) { resource.getMethod(localFile); } } can anybody help me? Best, Oleg Rostanin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Watch LIVE baseball games on your computer with MLB.TV, included with MSN Premium! http://join.msn.com/?page=features/mlbpgmarket=en-us/go/onm00200439ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ FREE pop-up blocking with the new MSN Toolbar get it now! http://toolbar.msn.com/go/onm00200415ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: patch for auto-create-users
Ryan Rhodes [EMAIL PROTECTED] writes: I went through the same progression as Jamie with auto-create-users. It would have been nice to have when I started, but it doesn't add anything now since I ultimately need the LDAP sync'd setup as well. Could you give an idea of just how much effort is involved in creating an LDAP store? I don't know if it makes it any easier, but I only need LDAP for usernames and passwords. I don't really even care if roles are stored in LDAP. If you don't need groups, why do you need a sync with the LDAP-Server? This is a scenario where autocreate-users is really helpfull. Configure your servlet container to use LDAP authentication. If you delete a user, in LDAP the servlet container does not longer allow login (assuming the container does not cache to much). So nobody cares about a user node in slide which belongs to user which not longer exists in LDAP. Btw. deleting this user node might be problematic, if the user still owns files. Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: patch for auto-create-users
Well, I should restate that. I do need roles. I was actually hoping to use SlideRealm, because I want other parts of the webapp to use Slide roles for access control. The only reason I need LDAP is because usernames/passwords must all come from LDAP in the environments we are targeting. Once the user is created in Slide, I want SlideRealm to handle everything. The question is... how do you use an LDAP Realm for authentication, but a SlideRealm for authorization. I think I would need the SlideRealm to pull it's users from an LDAP store. Does any of this sound correct? --Ryan From: Martin Holz [EMAIL PROTECTED] Reply-To: Slide Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: patch for auto-create-users Date: 27 Apr 2004 17:32:51 +0200 Ryan Rhodes [EMAIL PROTECTED] writes: I went through the same progression as Jamie with auto-create-users. It would have been nice to have when I started, but it doesn't add anything now since I ultimately need the LDAP sync'd setup as well. Could you give an idea of just how much effort is involved in creating an LDAP store? I don't know if it makes it any easier, but I only need LDAP for usernames and passwords. I don't really even care if roles are stored in LDAP. If you don't need groups, why do you need a sync with the LDAP-Server? This is a scenario where autocreate-users is really helpfull. Configure your servlet container to use LDAP authentication. If you delete a user, in LDAP the servlet container does not longer allow login (assuming the container does not cache to much). So nobody cares about a user node in slide which belongs to user which not longer exists in LDAP. Btw. deleting this user node might be problematic, if the user still owns files. Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Get rid of annoying pop-up ads with the new MSN Toolbar FREE! http://toolbar.msn.com/go/onm00200414ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Java Client - putMethod for a new file in a new directory
Hi, Using the slide Java client I'm trying to create a new file which I want to create in a directory that doesn't yet exist. I've tried several things, but can't get any to work. Say for example I want to create a new file at the URL: http://localhost:8080/slide/files/data/bob/newfile and the directory 'bob' does not yet exist, how would I go about doing this? here is an example of code I have tried: HttpURL httpURL = new HttpURL(http://localhost:8080/slide/files/data/bob/newfile;); wdr = new WebdavResource(httpURL, credentials, WebdavResource.NOACTION, DepthSupport.DEPTH_0); if (wdr.putMethod(bytes)) { System.out.println(YES!!); } else { System.out.println(NO!!); } I have also tried: HttpURL httpURL = new HttpURL(http://localhost:8080/slide/files/data/;); wdr = new WebdavResource(httpURL, credentials, WebdavResource.NOACTION, DepthSupport.DEPTH_0); if (wdr.putMethod(bob/newfile, bytes)) { System.out.println(YES!!); } else { System.out.println(NO!!); } Which also didn't work (and the directory 'data' does exist). Any pointers, I'm kind of lost here? Also, out of interest (and it may be related), how would I create a new empty directory? Cheers Luke. - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java Client - putMethod for a new file in a new directory
This is a test that I have written that I think does what you want - hope it helps. /** * Expecting user name of test/test to allow a correct login and give * write permissions * @throws Exception */ public void testWebdavWriteWithNewDirectory() throws Exception{ long begin = System.currentTimeMillis(); homeUrl.setUserinfo(test,test); WebdavResource res = new WebdavResource(homeUrl); assertTrue(res.exists()); try{ boolean success = res.mkcolMethod(/testDir); assertTrue(res.getStatusMessage(),success);//write an dir success = res.putMethod(/testDir/testFile,); assertTrue(res.getStatusMessage(),success);//write an empty file } finally{ res.deleteMethod(); } long end = System.currentTimeMillis(); System.out.println(seconds running: + (end-begin)/1000); } luke noel-storr wrote: Hi, Using the slide Java client I'm trying to create a new file which I want to create in a directory that doesn't yet exist. I've tried several things, but can't get any to work. Say for example I want to create a new file at the URL: http://localhost:8080/slide/files/data/bob/newfile and the directory 'bob' does not yet exist, how would I go about doing this? here is an example of code I have tried: HttpURL httpURL = new HttpURL(http://localhost:8080/slide/files/data/bob/newfile;); wdr = new WebdavResource(httpURL, credentials, WebdavResource.NOACTION, DepthSupport.DEPTH_0); if (wdr.putMethod(bytes)) { System.out.println(YES!!); } else { System.out.println(NO!!); } I have also tried: HttpURL httpURL = new HttpURL(http://localhost:8080/slide/files/data/;); wdr = new WebdavResource(httpURL, credentials, WebdavResource.NOACTION, DepthSupport.DEPTH_0); if (wdr.putMethod(bob/newfile, bytes)) { System.out.println(YES!!); } else { System.out.println(NO!!); } Which also didn't work (and the directory 'data' does exist). Any pointers, I'm kind of lost here? Also, out of interest (and it may be related), how would I create a new empty directory? Cheers Luke. - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amr Elssamadisy Developer,Researcher,Student (In no particular order...) tel: (413) 207-1225 email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: patch for auto-create-users
Ryan Rhodes [EMAIL PROTECTED] writes: Well, I should restate that. I do need roles. I was actually hoping to use SlideRealm, because I want other parts of the webapp to use Slide roles for access control. The only reason I need LDAP is because usernames/passwords must all come from LDAP in the environments we are targeting. Once the user is created in Slide, I want SlideRealm to handle everything. The question is... how do you use an LDAP Realm for authentication, but a SlideRealm for authorization. Don't use SlideRealm. The slide realm makes user/password combinations available to the servlet container. Any realm does not handle authorization. The servlet container does a coarse authorization based on the information in web.xml. If this authorization is successfull the implementation of org.apache.slide.Security will do a detailed authorization based on the information in the /users node. Slide ignores the results of javax.servlet.http.HttpRequest.isUserInRole(). Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Streams in webdav???
I'm trying to create a stream to a webdav file. Are there any classes that will help out in this? (I've tried FileOutputStream and failed becuase it doesn't know how to open something like http://localhost:8080/myfile.txt ) Thanks! -- Amr Elssamadisy Developer,Researcher,Student (In no particular order...) tel: (413) 207-1225 email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: patch for auto-create-users
Martin Holz wrote: Don't use SlideRealm. The slide realm makes user/password combinations available to the servlet container. I am not grasping this part. You mean that slide realm becomes the store for usernames/passwords that the servlet container authenticates against? Any realm does not handle authorization. The servlet container does a coarse authorization based on the information in web.xml. If this authorization is successfull the implementation of org.apache.slide.Security will do a detailed authorization based on the information in the /users node. Slide ignores the results of javax.servlet.http.HttpRequest.isUserInRole(). Martin I think we are in reverse here. I want to pull roles from Slide for other webapps. For instance, I might want to have a webapp with forums that are linked to slide groups, so that users of the webapp will browse the forums and only see the forums that are associated with the Slide Groups they belong to. I am thinking that the course authorization will be fine for apps that don't allow the users to directly manipulate the content tree. So... I want the webapps to use javax.servlet.http.HttpRequest.isUserInRole(), but I want the roles to come from Slide. Does this make sense? --Ryan _ MSN Toolbar provides one-click access to Hotmail from any Web page FREE download! http://toolbar.msn.com/go/onm00200413ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with getChildResources, ports and httpurl
Hello Everyone, I have a rather odd problem, and I and I was hoping the slide Gurus could help me out. I'm finally making the transition to a more recent build of the slide 2.0 libraries because I am getting an infinite folder problem with folders/collections that have characters such as '',',' and '.' and I was hoping this would resolve the problem, but alas I have another problem now where, the url with the port is getting changed. Like many of you, I have tomcat running on port 8080, with the old versions of the slide/http jars my URLs were correct after calling either listCollections or getChildResources, but now it's changing the url...in the following way. Correct URL: http://localhost:8080/a1/. Child Resources Returns: http://localhost8080:8080/a1/ Note that 8080 now appears twice in the url, and my machine name has effectively been changed to localhost8080 not localhost Has anyone else seen this problem? I have attached some example code which might be helpful to other newbies working with slide, as well as a way to see what I'm talking about Thanks for your help! One other note is the difference in the way the old jars behaved vs. the new, the old jars returned the parent+children, the new stuff just returns the children (this is actually much better). New Jars (Version 2.0 (Milestone Release) from 4/27/04) - http://localhost8080:8080/a1/My%20Reports/Results/SQL%20line%20items%20Out0003/invoiceNumber/10/SQL%20line%20items%20Out0003%2004-09-2004%2008-54-53-730%5B1%5D.pdf Display Name: 10 Children returned: 1 SQL line items Out0003 04-09-2004 08-54-53-730[1].pdf http://localhost8080:8080/a1/My%20Reports/Results/SQL%20line%20items%20Out0003/invoiceNumber/10/SQL%20line%20items%20Out0003%2004-09-2004%2008-54-53-730%5B1%5D.pdf Admin:password Old Jars (version 2.0 from CVS 1/7/04) - http://Admin:[EMAIL PROTECTED]:8080/a1/My Reports/Results/SQL line items Out0003/invoiceNumber/10/10 http://Admin:[EMAIL PROTECTED]:8080/a1/My Reports/Results/SQL line items Out0003/invoiceNumber/10/SQL%20line%20items%20Out0003%2004-09-2004%2008-54-53-730%5B1%5D.pdf Display Name: Children returned: 2 10 http://Admin:[EMAIL PROTECTED]:8080/a1/My Reports/Results/SQL line items Out0003/invoiceNumber/10/10 Admin:password SQL line items Out0003 04-09-2004 08-54-53-730[1].pdf http://Admin:[EMAIL PROTECTED]:8080/a1/My Reports/Results/SQL line items Out0003/invoiceNumber/10/SQL%20line%20items%20Out0003%2004-09-2004%2008-54-53-730%5B1%5D.pdf Admin:password Test2.txt (It's currently setup to run with the latest milestone jars) //OLD Jars from 1/6/04 /* import org.apache.util.HttpURL; import org.apache.webdav.lib.WebdavResource; import org.apache.webdav.lib.WebdavResources; import java.util.Enumeration; */ //New Jars structurefrom 4/27/04 import org.apache.commons.httpclient.HttpURL; import org.apache.commons.httpclient.URIException; import org.apache.webdav.lib.WebdavResource; import org.apache.commons.httpclient.HttpException; import java.io.IOException; import java.util.Enumeration; import org.apache.webdav.lib.WebdavResources; public class Test2 { public Test2() throws Exception { HttpURL url = new HttpURL(http://localhost:8080/a1/My Reports/Results/SQL line items Out0003/invoiceNumber/10); //old Http url uses uppercase I in setUserInfo //url.setUserInfo(Admin,password); //new HTTPURL requires lower case i in setUserinfo url.setUserinfo(Admin,password); WebdavResource wdResource=new WebdavResource(url); WebdavResources wdResources=wdResource.getChildResources(); Enumeration resourceEnumeration=wdResources.getResources(); while(resourceEnumeration.hasMoreElements()) { WebdavResource tempResource=((WebdavResource) resourceEnumeration.nextElement()); System.out.println(tempResource.getHttpURL()); } System.out.println(Display Name: + wdResource.getDisplayName()); WebdavResource[] webdavList=null; webdavList=wdResource.listWebdavResources(); System.out.println(Children returned: + webdavList.length); for(int idx=0; idxwebdavList.length;idx++) { System.out.println(\t + webdavList[idx].getDisplayName()); System.out.println(\t + webdavList[idx].getHttpURL()); //Old Httpurl has a getUserInfo command... //System.out.println(\t+ webdavList[idx].getHttpURL().getUserInfo()); //New Httpurl has System.out.println(\t+ webdavList[idx].getHttpURL().getUserinfo()); } } public static void main(String[] args) throws Exception { new Test2(); } } _ FREE pop-up blocking with the new MSN Toolbar get it now! http://toolbar.msn.com/go/onm00200415ave/direct/01/