Re: Which event to listen for?

2005-07-25 Thread Thomas Bellembois

Hi,

Have you tried with the DetailedWebdavListener ? The "putAfter" event is 
thrown just after a resource is put on the server.

You should be able to retrieve your inputStream using the WebdavEvent.

Hope it helps.

Thomas


Brandon Dove wrote:


Hi -- I'm writing some code that will:

1. Extended ContentAdaptor to listen for "create" ContentEvents.
2. Determine if the resource being created is an image.
3. Get an InputStream from that resource to do some further
processing of the image.

The problem I've run into is that I'm notified of the "create"
event, but at this point the resource doesn't actually exist in
the slide repository so attempting to get an InputStream from
that resource is useless. I've tried listening for other
ContentEvents like "store" but they seem to have the same
result. What event should I be listening for in this situation?

Thanks again for your help.

Cheers,

Brandon


Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 




--
+---=(Thomas Bellembois)=---+
| CRI - University of Rennes 1 - FR |
| [EMAIL PROTECTED] |
| +33 2 23 23 69 60 |
+---+


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Windows XP mapping

2005-07-25 Thread Tobias Maier
In February there was a discussion about mapping WebDAV to WinXP.
One guy posted a solution to that problem, but I don't get it work.
Does anyone know if I need a special config file for tomcat server and
slide?
Or is it a windows config problem?

Thanks for any help...
regards Tobias

-- 
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse f�r Mail, Message, More +++

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: My "dirty" solution to set non-inheritable privileges using webdav client

2005-07-25 Thread Miguel Figueiredo
 

Good morning,

 

 Have you checked the following parameter?

 

 [path|0|1|...]

 

 It’s configurable in the Domain.xml

 

 Hope this helps,

 Miguel Figueiredo

 

 

-Original Message-
From: Maximo Gurmendez [mailto:[EMAIL PROTECTED] 
Sent: segunda-feira, 25 de Julho de 2005 5:20
To: Slide Users Mailing List
Subject: My "dirty" solution to set non-inheritable privileges using webdav
client

 

I've modified the createNodePermissionList method from
org.apache.slide.webdav.method.AclMethod class as pasted below.

For doing this I send through webdav a new privilege "read-noninheritable"
or "write-noninheritable", and it works fine.

 

Example, for client:

 

Ace a = new Ace("/users/auser");

a.setInherited(false);

a.addPrivilege(new
Privilege("ECADEMICUS:","read-noninherited","inherit"));

a.setProtected(false);

a.setNegative(false);

Ace[] aces = new Ace[1];

aces[0]=a;

boolean ok = res.aclMethod("/files/afolder",aces);

 

Maybe it is not the best, but it was suggested as a posibility. Maybe
someone knows of a better way.

 

Many thanks,

 Máximo

 

Ing. Máximo Gurméndez

IT Applications Integrator

The British Schools, Montevideo

Máximo Tajes 6400

Tel. 6003421 int. 136

email: [EMAIL PROTECTED]

 

 




 

 

 

private List createNodePermissionList( Element aceElm ) throws
PreconditionViolationException, SlideException, JDOMException {

List result = new ArrayList();

String objectUri = resourcePath;

String subjectUri = null;

String actionUri = null;

boolean negative = false;

boolean invert = false;



// ACE principal

Element principalElm = aceElm.getChild(E_PRINCIPAL, DNSP);

if (principalElm == null) {

Element invertElm = aceElm.getChild(E_INVERT, DNSP);

if (invertElm != null) {

invert = true;

principalElm = invertElm.getChild(E_PRINCIPAL, DNSP);

}

}

if (principalElm != null) {

subjectUri = createSubjectUri(principalElm);

}

else {

throw new PreconditionViolationException(

new ViolatedPrecondition("missing-ace-principal",
WebdavStatus.SC_BAD_REQUEST), resourcePath

);

}



// ACE grant and deny

Element grantDenyElm = null;

Element grantElm = aceElm.getChild(E_GRANT, DNSP);

Element denyElm = aceElm.getChild(E_DENY, DNSP);

if (grantElm != null && denyElm == null) {

grantDenyElm = grantElm;

}

else if (grantElm == null && denyElm != null) {

negative = true;

grantDenyElm = denyElm;

}

else if(grantElm != null && denyElm != null) {

throw new PreconditionViolationException(

new ViolatedPrecondition("only-grant-or-deny-allowed",
WebdavStatus.SC_BAD_REQUEST), resourcePath

);

}

else if(grantElm == null && denyElm == null) {

throw new PreconditionViolationException(

new ViolatedPrecondition("missing-grant-or-deny",
WebdavStatus.SC_BAD_REQUEST), resourcePath

);

}

Iterator privilegeIt = grantDenyElm.getChildren(E_PRIVILEGE,
DNSP).iterator();



while (privilegeIt.hasNext()) {

Element privilegeElm = (Element)privilegeIt.next();

actionUri = createActionUri(privilegeElm);

if (actionUri == null) {

throw new PreconditionViolationException(

new ViolatedPrecondition("not-supported-privilege",
WebdavStatus.SC_BAD_REQUEST), resourcePath

);

}

else {

//begin add ecademicus

boolean inherit=true;

if (actionUri.endsWith("-noninherited")) {

inherit=false;

actionUri=actionUri.replaceAll("-noninherited","");

}

//end add ecademicus





//NodePermission np = new NodePermission(objectUri,
subjectUri, actionUri, true, negative);

// mod ecademicus

NodePermission np = new NodePermission(objectUri,
subjectUri, actionUri, inherit, negative);

np.setInvert(invert);

result.add(np);

}

}



   



return result;

}



Slide document's LastModifiedDate

2005-07-25 Thread Rakesh Saha

Hi All ,

I am trying to get the invalidate my custom cache based the lastmodifed 
date of the document stored in Slide repository.


Firsttime it is getting the right lastmodifiedtime properly.
After I modify that document through webdav or slide API, but I get same 
lastmodifedtime although content is modified one.


I am using following code for getting the lastmodifiedtime :

   // Then we must get object contents ...
   NodeRevisionDescriptors revisionDescriptors = 
content.retrieve(slideToken, resourcePath);


   if (revisionDescriptors.hasRevisions()) {

 // Retrieve latest revision descriptor
 NodeRevisionDescriptor revisionDescriptor = 
content.retrieve(slideToken, revisionDescriptors);


 if (revisionDescriptor != null) { 
   String date = revisionDescriptor.getLastModified();   
   /System.out.println(" last date :"+date +" version 
:"+revisionDescriptor.getRevisionNumber());/   
   return date;

 }
   }

Is it hitting the Slide Cache [ but I am able to get the content 
properly] or versioning issue or it is known feature/limitation or at 
last I am missing something [ more likely :)] ?


TIA,
Rakesh



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: My "dirty" solution to set non-inheritable privileges using webdav client

2005-07-25 Thread Thomas Bellembois

Hello,

It does not seem to work either.
I have the same problem.
When I put the following permission on a resource :

inheritable="true" negative="false" />



The user "bourges" can write but if I change the inheritable="true" into 
"false" it does not work anymore.


I have tried many configurations in my Domain.xml for the 
acl_inheritance_type parameter.


Any idea ?

Thanks.

Thomas


Miguel Figueiredo wrote:




Good morning,



Have you checked the following parameter?



[path|0|1|...]



It’s configurable in the Domain.xml



Hope this helps,

Miguel Figueiredo





-Original Message-
From: Maximo Gurmendez [mailto:[EMAIL PROTECTED] 
Sent: segunda-feira, 25 de Julho de 2005 5:20

To: Slide Users Mailing List
Subject: My "dirty" solution to set non-inheritable privileges using webdav
client



I've modified the createNodePermissionList method from
org.apache.slide.webdav.method.AclMethod class as pasted below.

For doing this I send through webdav a new privilege "read-noninheritable"
or "write-noninheritable", and it works fine.



Example, for client:



   Ace a = new Ace("/users/auser");

   a.setInherited(false);

   a.addPrivilege(new
Privilege("ECADEMICUS:","read-noninherited","inherit"));

   a.setProtected(false);

   a.setNegative(false);

   Ace[] aces = new Ace[1];

   aces[0]=a;

   boolean ok = res.aclMethod("/files/afolder",aces);



Maybe it is not the best, but it was suggested as a posibility. Maybe
someone knows of a better way.



Many thanks,

Máximo



Ing. Máximo Gurméndez

IT Applications Integrator

The British Schools, Montevideo

Máximo Tajes 6400

Tel. 6003421 int. 136

email: [EMAIL PROTECTED]














private List createNodePermissionList( Element aceElm ) throws
PreconditionViolationException, SlideException, JDOMException {

   List result = new ArrayList();

   String objectUri = resourcePath;

   String subjectUri = null;

   String actionUri = null;

   boolean negative = false;

   boolean invert = false;

   


   // ACE principal

   Element principalElm = aceElm.getChild(E_PRINCIPAL, DNSP);

   if (principalElm == null) {

   Element invertElm = aceElm.getChild(E_INVERT, DNSP);

   if (invertElm != null) {

   invert = true;

   principalElm = invertElm.getChild(E_PRINCIPAL, DNSP);

   }

   }

   if (principalElm != null) {

   subjectUri = createSubjectUri(principalElm);

   }

   else {

   throw new PreconditionViolationException(

   new ViolatedPrecondition("missing-ace-principal",
WebdavStatus.SC_BAD_REQUEST), resourcePath

   );

   }

   


   // ACE grant and deny

   Element grantDenyElm = null;

   Element grantElm = aceElm.getChild(E_GRANT, DNSP);

   Element denyElm = aceElm.getChild(E_DENY, DNSP);

   if (grantElm != null && denyElm == null) {

   grantDenyElm = grantElm;

   }

   else if (grantElm == null && denyElm != null) {

   negative = true;

   grantDenyElm = denyElm;

   }

   else if(grantElm != null && denyElm != null) {

   throw new PreconditionViolationException(

   new ViolatedPrecondition("only-grant-or-deny-allowed",
WebdavStatus.SC_BAD_REQUEST), resourcePath

   );

   }

   else if(grantElm == null && denyElm == null) {

   throw new PreconditionViolationException(

   new ViolatedPrecondition("missing-grant-or-deny",
WebdavStatus.SC_BAD_REQUEST), resourcePath

   );

   }

   Iterator privilegeIt = grantDenyElm.getChildren(E_PRIVILEGE,
DNSP).iterator();

   


   while (privilegeIt.hasNext()) {

   Element privilegeElm = (Element)privilegeIt.next();

   actionUri = createActionUri(privilegeElm);

   if (actionUri == null) {

   throw new PreconditionViolationException(

   new ViolatedPrecondition("not-supported-privilege",
WebdavStatus.SC_BAD_REQUEST), resourcePath

   );

   }

   else {

   //begin add ecademicus

   boolean inherit=true;

   if (actionUri.endsWith("-noninherited")) {

   inherit=false;

   actionUri=actionUri.replaceAll("-noninherited","");

   }

   //end add ecademicus

   

   


   //NodePermission np = new NodePermission(objectUri,
subjectUri, actionUri, true, negative);

   // mod ecademicus

   NodePermission np = new NodePermission(objectUri,
subjectUri, actionUri, inherit, negative);

   np.setInvert(invert);

   result.add(np);

   }

   }

   

  

   


   return result;

   }


 




--
+---=(

Re: Windows XP mapping

2005-07-25 Thread Rakesh Saha
For me http://jakarta.apache.org/slide/xp.html works [ I am working with 
Jetty although ] .


HTH.
Thanks,
rakesh

Tobias Maier wrote:


In February there was a discussion about mapping WebDAV to WinXP.
One guy posted a solution to that problem, but I don't get it work.
Does anyone know if I need a special config file for tomcat server and
slide?
Or is it a windows config problem?

Thanks for any help...
regards Tobias

 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: My "dirty" solution to set non-inheritable privileges using webdav client

2005-07-25 Thread Maximo Gurmendez
I've tried something similar, and worked well through the domain.xml, 
however I need to add this privilege without restarting the application 
(through webdav).


I recall I had a similar problem on a folder, say, /files/afolder and the 
problem was that it needed to have /files read permission (not inherited)


Regards,
  Maximo


- Original Message - 
From: "Thomas Bellembois" <[EMAIL PROTECTED]>

To: "Slide Users Mailing List" 
Sent: Monday, July 25, 2005 7:35 AM
Subject: Re: My "dirty" solution to set non-inheritable privileges using 
webdav client




Hello,

It does not seem to work either.
I have the same problem.
When I put the following permission on a resource :

inheritable="true" negative="false" />



The user "bourges" can write but if I change the inheritable="true" into 
"false" it does not work anymore.


I have tried many configurations in my Domain.xml for the 
acl_inheritance_type parameter.


Any idea ?

Thanks.

Thomas


Miguel Figueiredo wrote:



Good morning,


Have you checked the following parameter?


[path|0|1|...]


It’s configurable in the Domain.xml


Hope this helps,

Miguel Figueiredo



-Original Message-
From: Maximo Gurmendez [mailto:[EMAIL PROTECTED] Sent: 
segunda-feira, 25 de Julho de 2005 5:20

To: Slide Users Mailing List
Subject: My "dirty" solution to set non-inheritable privileges using 
webdav

client


I've modified the createNodePermissionList method from
org.apache.slide.webdav.method.AclMethod class as pasted below.

For doing this I send through webdav a new privilege "read-noninheritable"
or "write-noninheritable", and it works fine.


Example, for client:


   Ace a = new Ace("/users/auser");

   a.setInherited(false);

   a.addPrivilege(new
Privilege("ECADEMICUS:","read-noninherited","inherit"));

   a.setProtected(false);

   a.setNegative(false);

   Ace[] aces = new Ace[1];

   aces[0]=a;

   boolean ok = res.aclMethod("/files/afolder",aces);


Maybe it is not the best, but it was suggested as a posibility. Maybe
someone knows of a better way.


Many thanks,

Máximo


Ing. Máximo Gurméndez

IT Applications Integrator

The British Schools, Montevideo

Máximo Tajes 6400

Tel. 6003421 int. 136

email: [EMAIL PROTECTED]









private List createNodePermissionList( Element aceElm ) throws
PreconditionViolationException, SlideException, JDOMException {

   List result = new ArrayList();

   String objectUri = resourcePath;

   String subjectUri = null;

   String actionUri = null;

   boolean negative = false;

   boolean invert = false;


   // ACE principal

   Element principalElm = aceElm.getChild(E_PRINCIPAL, DNSP);

   if (principalElm == null) {

   Element invertElm = aceElm.getChild(E_INVERT, DNSP);

   if (invertElm != null) {

   invert = true;

   principalElm = invertElm.getChild(E_PRINCIPAL, DNSP);

   }

   }

   if (principalElm != null) {

   subjectUri = createSubjectUri(principalElm);

   }

   else {

   throw new PreconditionViolationException(

   new ViolatedPrecondition("missing-ace-principal",
WebdavStatus.SC_BAD_REQUEST), resourcePath

   );

   }


   // ACE grant and deny

   Element grantDenyElm = null;

   Element grantElm = aceElm.getChild(E_GRANT, DNSP);

   Element denyElm = aceElm.getChild(E_DENY, DNSP);

   if (grantElm != null && denyElm == null) {

   grantDenyElm = grantElm;

   }

   else if (grantElm == null && denyElm != null) {

   negative = true;

   grantDenyElm = denyElm;

   }

   else if(grantElm != null && denyElm != null) {

   throw new PreconditionViolationException(

   new ViolatedPrecondition("only-grant-or-deny-allowed",
WebdavStatus.SC_BAD_REQUEST), resourcePath

   );

   }

   else if(grantElm == null && denyElm == null) {

   throw new PreconditionViolationException(

   new ViolatedPrecondition("missing-grant-or-deny",
WebdavStatus.SC_BAD_REQUEST), resourcePath

   );

   }

   Iterator privilegeIt = grantDenyElm.getChildren(E_PRIVILEGE,
DNSP).iterator();


   while (privilegeIt.hasNext()) {

   Element privilegeElm = (Element)privilegeIt.next();

   actionUri = createActionUri(privilegeElm);

   if (actionUri == null) {

   throw new PreconditionViolationException(

   new ViolatedPrecondition("not-supported-privilege",
WebdavStatus.SC_BAD_REQUEST), resourcePath

   );

   }

   else {

   //begin add ecademicus

   boolean inherit=true;

   if (actionUri.endsWith("-noninherited")) {

   inherit=false;

   actionUri=actionUri.replaceAll("-noninhe

Re: Re: Which event to listen for?

2005-07-25 Thread Brandon Dove
Thomas -- I can't find reference to the DetailedWebdavListener
in either the client or server code. Where is this class?

Cheers,

Brandon

 On Mon, 25 Jul 2005, Thomas Bellembois
([EMAIL PROTECTED]) wrote:

> Hi,
> 
> Have you tried with the DetailedWebdavListener ? The
"putAfter" event is 
> thrown just after a resource is put on the server.
> You should be able to retrieve your inputStream using the
WebdavEvent.
> 
> Hope it helps.
> 
> Thomas
> 
> 
> Brandon Dove wrote:
> 
> >Hi -- I'm writing some code that will:
> >
> >1. Extended ContentAdaptor to listen for "create"
ContentEvents.
> >2. Determine if the resource being created is an image.
> >3. Get an InputStream from that resource to do some further
> >processing of the image.
> >
> >The problem I've run into is that I'm notified of the
"create"
> >event, but at this point the resource doesn't actually exist
in
> >the slide repository so attempting to get an InputStream from
> >that resource is useless. I've tried listening for other
> >ContentEvents like "store" but they seem to have the same
> >result. What event should I be listening for in this
situation?
> >
> >Thanks again for your help.
> >
> >Cheers,
> >
> >Brandon
> >
> >
> >Get your own "800" number
> >Voicemail, fax, email, and a lot more
> >http://www.ureach.com/reg/tag
> >
>
>-
> >To unsubscribe, e-mail:
[EMAIL PROTECTED]
> >For additional commands, e-mail:
[EMAIL PROTECTED]
> >
> >
> >  
> >
> 
> 
> -- 
> +---=(Thomas Bellembois)=---+
> | CRI - University of Rennes 1 - FR |
> | [EMAIL PROTECTED] |
> | +33 2 23 23 69 60 |
> +---+
> 
> 
>
-
> To unsubscribe, e-mail:
[EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]
> 
> 
> 



Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: My "dirty" solution to set non-inheritable privileges using webdav client

2005-07-25 Thread Thomas Bellembois

Hello,

It does not work for me, even with the read permission on /files (and on 
the full path).
I wonder if Slide manages non inheritable permissions even with the 
acl_inheritance_type parameter ?


Thomas

Maximo Gurmendez wrote:

I've tried something similar, and worked well through the domain.xml, 
however I need to add this privilege without restarting the 
application (through webdav).


I recall I had a similar problem on a folder, say, /files/afolder and 
the problem was that it needed to have /files read permission (not 
inherited)


Regards,
  Maximo


- Original Message - From: "Thomas Bellembois" 
<[EMAIL PROTECTED]>

To: "Slide Users Mailing List" 
Sent: Monday, July 25, 2005 7:35 AM
Subject: Re: My "dirty" solution to set non-inheritable privileges 
using webdav client




Hello,

It does not seem to work either.
I have the same problem.
When I put the following permission on a resource :

inheritable="true" negative="false" />



The user "bourges" can write but if I change the inheritable="true" 
into "false" it does not work anymore.


I have tried many configurations in my Domain.xml for the 
acl_inheritance_type parameter.


Any idea ?

Thanks.

Thomas


Miguel Figueiredo wrote:



Good morning,


Have you checked the following parameter?


[path|0|1|...]


It’s configurable in the Domain.xml


Hope this helps,

Miguel Figueiredo



-Original Message-
From: Maximo Gurmendez [mailto:[EMAIL PROTECTED] Sent: 
segunda-feira, 25 de Julho de 2005 5:20

To: Slide Users Mailing List
Subject: My "dirty" solution to set non-inheritable privileges using 
webdav

client


I've modified the createNodePermissionList method from
org.apache.slide.webdav.method.AclMethod class as pasted below.

For doing this I send through webdav a new privilege 
"read-noninheritable"

or "write-noninheritable", and it works fine.


Example, for client:


   Ace a = new Ace("/users/auser");

   a.setInherited(false);

   a.addPrivilege(new
Privilege("ECADEMICUS:","read-noninherited","inherit"));

   a.setProtected(false);

   a.setNegative(false);

   Ace[] aces = new Ace[1];

   aces[0]=a;

   boolean ok = res.aclMethod("/files/afolder",aces);


Maybe it is not the best, but it was suggested as a posibility. Maybe
someone knows of a better way.


Many thanks,

Máximo


Ing. Máximo Gurméndez

IT Applications Integrator

The British Schools, Montevideo

Máximo Tajes 6400

Tel. 6003421 int. 136

email: [EMAIL PROTECTED]



 







private List createNodePermissionList( Element aceElm ) throws
PreconditionViolationException, SlideException, JDOMException {

   List result = new ArrayList();

   String objectUri = resourcePath;

   String subjectUri = null;

   String actionUri = null;

   boolean negative = false;

   boolean invert = false;


   // ACE principal

   Element principalElm = aceElm.getChild(E_PRINCIPAL, DNSP);

   if (principalElm == null) {

   Element invertElm = aceElm.getChild(E_INVERT, DNSP);

   if (invertElm != null) {

   invert = true;

   principalElm = invertElm.getChild(E_PRINCIPAL, DNSP);

   }

   }

   if (principalElm != null) {

   subjectUri = createSubjectUri(principalElm);

   }

   else {

   throw new PreconditionViolationException(

   new ViolatedPrecondition("missing-ace-principal",
WebdavStatus.SC_BAD_REQUEST), resourcePath

   );

   }


   // ACE grant and deny

   Element grantDenyElm = null;

   Element grantElm = aceElm.getChild(E_GRANT, DNSP);

   Element denyElm = aceElm.getChild(E_DENY, DNSP);

   if (grantElm != null && denyElm == null) {

   grantDenyElm = grantElm;

   }

   else if (grantElm == null && denyElm != null) {

   negative = true;

   grantDenyElm = denyElm;

   }

   else if(grantElm != null && denyElm != null) {

   throw new PreconditionViolationException(

   new ViolatedPrecondition("only-grant-or-deny-allowed",
WebdavStatus.SC_BAD_REQUEST), resourcePath

   );

   }

   else if(grantElm == null && denyElm == null) {

   throw new PreconditionViolationException(

   new ViolatedPrecondition("missing-grant-or-deny",
WebdavStatus.SC_BAD_REQUEST), resourcePath

   );

   }

   Iterator privilegeIt = grantDenyElm.getChildren(E_PRIVILEGE,
DNSP).iterator();


   while (privilegeIt.hasNext()) {

   Element privilegeElm = (Element)privilegeIt.next();

   actionUri = createActionUri(privilegeElm);

   if (actionUri == null) {

   throw new PreconditionViolationException(

   new ViolatedPrecondition("not-supported-privilege",
WebdavStatus.SC_BAD_REQUEST), resourcePath

   );

   }

   

RE: Slide document's LastModifiedDate

2005-07-25 Thread Ray Sprinkle
The Webdav spec recommends using the getetag property for this. This tag
changes whenever the object is modified.  I am not sure what happens to
getetag when the content of a collection is modified.

-Original Message-
From: Rakesh Saha [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 25, 2005 5:57 AM
To: slide-user@jakarta.apache.org
Subject: Slide document's LastModifiedDate

Hi All ,

I am trying to get the invalidate my custom cache based the lastmodifed
date of the document stored in Slide repository.

Firsttime it is getting the right lastmodifiedtime properly.
After I modify that document through webdav or slide API, but I get same
lastmodifedtime although content is modified one.

I am using following code for getting the lastmodifiedtime :

// Then we must get object contents ...
NodeRevisionDescriptors revisionDescriptors =
content.retrieve(slideToken, resourcePath);

if (revisionDescriptors.hasRevisions()) {

  // Retrieve latest revision descriptor
  NodeRevisionDescriptor revisionDescriptor =
content.retrieve(slideToken, revisionDescriptors);

  if (revisionDescriptor != null) { 
String date = revisionDescriptor.getLastModified();   
/System.out.println(" last date :"+date +" version 
:"+revisionDescriptor.getRevisionNumber());/   
return date;
  }
}

Is it hitting the Slide Cache [ but I am able to get the content
properly] or versioning issue or it is known feature/limitation or at
last I am missing something [ more likely :)] ?

TIA,
Rakesh



-
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: i am new to Slide and not able to connecting client.........please help ...

2005-07-25 Thread Srinivas Rao

Hi friends,

I am getting the same error repeatly if any one
the setting in the server.xml domain.xml and
web.xml...

> org.apache.commons.httpclient.HttpException
> at
>
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.ja
> va:3467)
> at
>
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.ja
> va:3423)
> at
>
org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java
> :967)


please help me

Thanks
Srinivas
--- Srinivas Rao <[EMAIL PROTECTED]> wrote:

> Hi Phil,
> 
> this is the my code ...look into that...i thing it's
> in server configuration ...but i used the DAV
> Explorer
> to connect the Server...it's working and...another
> one
> is ...i downloaded the Jakarta Slide Client
> Bin...it's
> also working 
> 
> but this simple program is not working 
> // Slide Simple WebDAV client example
> import java.io.File;
> import java.io.IOException;
> import java.net.MalformedURLException;
> 
> import org.apache.commons.httpclient.HttpException;
> import org.apache.commons.httpclient.*;
> import org.apache.webdav.lib.*;
> 
> public class SlideTest {
> 
> public static void main (String args[])
> {
> 
> try
> {
> HttpURL hrl =new
> HttpURL("http://srinivas:1999/slide/files";);
> 
> hrl.setUserinfo("john","john");
> System.out.println("Url
> Connected."+hrl.getPath());
> WebdavResource wdr = new
> WebdavResource(hrl);
> if(wdr==null){
> System.out.println("Some thing wrong on
> connection to WebDav");
> }
> System.out.println("Url
>
Connected."+wdr.getDisplayName());
> System.out.println(
> wdr.getPath());
> wdr.putMethod(args[0]);
> wdr.close();
> }
> catch(MalformedURLException mue)
> {
>   mue.printStackTrace();
> }
> catch(HttpException he)
> {
>   he.printStackTrace();
> }
> catch(Exception ioe)
> {
>   ioe.printStackTrace();
> }
> }
> }
> 
> 
> and the out put is...
> 
> Url Connected./slide/files
> log4j:WARN No appenders could be found for logger
> (org.apache.commons.httpclient
> .HttpClient).
> log4j:WARN Please initialize the log4j system
> properly.
> org.apache.commons.httpclient.HttpException
> at
>
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.ja
> va:3467)
> at
>
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.ja
> va:3423)
> at
>
org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java
> :967)
> at
>
org.apache.webdav.lib.WebdavResource.setBasicProperties(WebdavResourc
> e.java:912)
> at
>
org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.jav
> a:1894)
> at
>
org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1
> 301)
> at
>
org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1
> 320)
> at
>
org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1
> 408)
> at
>
org.apache.webdav.lib.WebdavResource.(WebdavResource.java:290)
> at SlideTest.main(SlideTest.java:21)
> 
> 
> 
> Thanks
> Srinivas
> --- "Burnside, Phillip (UK - Glasgow)"
> <[EMAIL PROTECTED]> wrote:
> 
> > Srinivas,
> >  
> > Can you post your full code up to the list and
> I'll
> > have a look,
> >  
> > Rgrds
> > Phil
> > 
> > -Original Message- 
> > From: Srinivas Rao
> [mailto:[EMAIL PROTECTED] 
> > Sent: Fri 22/07/2005 07:20 
> > To: Slide Users Mailing List 
> > Cc: 
> > Subject: RE: i am new to Slide and not able to
> > connecting client.please help ...
> > 
> > 
> > 
> > Hi Phillip,
> > 
> > I tried using the import org.apache.webdav.lib.*;
> > 
> > but i am getting the same errorhow can i
> solve
> > this problem???
> > 
> > Any idea???
> > 
> > Thanks
> > Srinivas
> > 
> > --- "Burnside, Phillip (UK - Glasgow)"
> > <[EMAIL PROTECTED]> wrote:
> > 
> > > Try using
> > > import org.apache.webdav.lib.*;
> > > 
> > > instead of
> > > 
> > > import org.apache.webdav.lib.WebdavResource;
> > >
> > >   -Original Message-
> > >   From: Srinivas Rao
> > [mailto:[EMAIL PROTECTED]
> > >   Sent: Thu 21/07/2005 17:38
> > >   To: Slide Users Mailing List
> > >   Cc:
> > >   Subject: i am new to Slide and not able
> to
> > > connecting client.please help ...
> > >  
> > >  
> > >
> > >   Hi Friends,
> > >  
> > >   I got few samples from friends and ne
> > alosbut i
> > > am not able to connect the client through the
> > > Webd

RE: i am new to Slide and not able to connecting client.........please help ...

2005-07-25 Thread Srinivas Rao

Hi friends,

I am getting the same error repeatly if any one
the setting in the server.xml domain.xml and
web.xml...

> org.apache.commons.httpclient.HttpException
> at
>
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.ja
> va:3467)
> at
>
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.ja
> va:3423)
> at
>
org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java
> :967)


please help me

Thanks
Srinivas
--- Srinivas Rao <[EMAIL PROTECTED]> wrote:

> Hi Phil,
> 
> this is the my code ...look into that...i thing it's
> in server configuration ...but i used the DAV
> Explorer
> to connect the Server...it's working and...another
> one
> is ...i downloaded the Jakarta Slide Client
> Bin...it's
> also working 
> 
> but this simple program is not working 
> // Slide Simple WebDAV client example
> import java.io.File;
> import java.io.IOException;
> import java.net.MalformedURLException;
> 
> import org.apache.commons.httpclient.HttpException;
> import org.apache.commons.httpclient.*;
> import org.apache.webdav.lib.*;
> 
> public class SlideTest {
> 
> public static void main (String args[])
> {
> 
> try
> {
> HttpURL hrl =new
> HttpURL("http://srinivas:1999/slide/files";);
> 
> hrl.setUserinfo("john","john");
> System.out.println("Url
> Connected."+hrl.getPath());
> WebdavResource wdr = new
> WebdavResource(hrl);
> if(wdr==null){
> System.out.println("Some thing wrong on
> connection to WebDav");
> }
> System.out.println("Url
>
Connected."+wdr.getDisplayName());
> System.out.println(
> wdr.getPath());
> wdr.putMethod(args[0]);
> wdr.close();
> }
> catch(MalformedURLException mue)
> {
>   mue.printStackTrace();
> }
> catch(HttpException he)
> {
>   he.printStackTrace();
> }
> catch(Exception ioe)
> {
>   ioe.printStackTrace();
> }
> }
> }
> 
> 
> and the out put is...
> 
> Url Connected./slide/files
> log4j:WARN No appenders could be found for logger
> (org.apache.commons.httpclient
> .HttpClient).
> log4j:WARN Please initialize the log4j system
> properly.
> org.apache.commons.httpclient.HttpException
> at
>
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.ja
> va:3467)
> at
>
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.ja
> va:3423)
> at
>
org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java
> :967)
> at
>
org.apache.webdav.lib.WebdavResource.setBasicProperties(WebdavResourc
> e.java:912)
> at
>
org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.jav
> a:1894)
> at
>
org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1
> 301)
> at
>
org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1
> 320)
> at
>
org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java:1
> 408)
> at
>
org.apache.webdav.lib.WebdavResource.(WebdavResource.java:290)
> at SlideTest.main(SlideTest.java:21)
> 
> 
> 
> Thanks
> Srinivas
> --- "Burnside, Phillip (UK - Glasgow)"
> <[EMAIL PROTECTED]> wrote:
> 
> > Srinivas,
> >  
> > Can you post your full code up to the list and
> I'll
> > have a look,
> >  
> > Rgrds
> > Phil
> > 
> > -Original Message- 
> > From: Srinivas Rao
> [mailto:[EMAIL PROTECTED] 
> > Sent: Fri 22/07/2005 07:20 
> > To: Slide Users Mailing List 
> > Cc: 
> > Subject: RE: i am new to Slide and not able to
> > connecting client.please help ...
> > 
> > 
> > 
> > Hi Phillip,
> > 
> > I tried using the import org.apache.webdav.lib.*;
> > 
> > but i am getting the same errorhow can i
> solve
> > this problem???
> > 
> > Any idea???
> > 
> > Thanks
> > Srinivas
> > 
> > --- "Burnside, Phillip (UK - Glasgow)"
> > <[EMAIL PROTECTED]> wrote:
> > 
> > > Try using
> > > import org.apache.webdav.lib.*;
> > > 
> > > instead of
> > > 
> > > import org.apache.webdav.lib.WebdavResource;
> > >
> > >   -Original Message-
> > >   From: Srinivas Rao
> > [mailto:[EMAIL PROTECTED]
> > >   Sent: Thu 21/07/2005 17:38
> > >   To: Slide Users Mailing List
> > >   Cc:
> > >   Subject: i am new to Slide and not able
> to
> > > connecting client.please help ...
> > >  
> > >  
> > >
> > >   Hi Friends,
> > >  
> > >   I got few samples from friends and ne
> > alosbut i
> > > am not able to connect the client through the
> > > Webd

Oracle Store Serialization problem

2005-07-25 Thread Muhammad Al Sebaeyie
Hi All
We Setup an oracle store on Slide 2.1 Release and then Later 2.2 (latest 
from head) working off an oracle JDBC store, after much problems (discussed 
somewhere here too ) we contacted oracle and they suggested an upgrade from 
9.2.0.1  to 9.2.0.5 
which made the problem go away, but now I'm hit with multiple 'cant 
serialize access to transaction errors'. I've tried to overcome that by 
making the application retry multiple times. But this happens a LOT, on PUT, 
CHECKOUT, CHECKIN, VERSIONCONTROL, and doesnt have a pattern... and a weird 
side effect is that docs get renamed by slide from doc.txt to doc[5].txt or 
doc[3].txt or the like. 
There is a firewall between the db server and the slide webserver...
Does this have to do with caching or delay from the firewall?

here is part of my stack trace:
http-8087-Processor22, 25-Jul-2005 06:54:42, root, PROPFIND, 207 
"Multi-Status", 10 ms, /files/5/doc.APPL.tif
http-8087-Processor22, 25-Jul-2005 06:54:42, root, GET, 200 "OK", 73 ms, 
/files/5/doc.APPL.tif
http-8087-Processor22, 25-Jul-2005 06:54:42, root, PROPFIND, 207 
"Multi-Status", 11 ms, /files/5/doc.APPL.tif
http-8087-Processor22, 25-Jul-2005 06:54:42, root, PROPFIND, 207 
"Multi-Status", 9 ms, /files/5/doc.APPL.tif
http-8087-Processor22, 25-Jul-2005 06:54:42, root, PROPFIND, 207 
"Multi-Status", 10 ms, /files/5/doc.APPL.tif
http-8087-Processor22, 25-Jul-2005 06:54:42, root, PROPFIND, 207 
"Multi-Status", 10 ms, /files/5/doc.APPL.tif
http-8087-Processor22, 25-Jul-2005 06:54:42, root, PROPFIND, 207 
"Multi-Status", 10 ms, /files/5/doc.APPL.tif
http-8087-Processor22, 25-Jul-2005 06:54:42, root, PROPFIND, 207 
"Multi-Status", 10 ms, /files/5/doc.APPL.tif
http-8087-Processor18, 25-Jul-2005 06:55:34, root, PROPFIND, 207 
"Multi-Status", 10 ms, /files/5
http-8087-Processor22, 25-Jul-2005 06:55:34, root, PROPFIND, 207 
"Multi-Status", 10 ms, /files/5
http-8087-Processor15, 25-Jul-2005 06:55:34, root, PROPFIND, 207 
"Multi-Status", 11 ms, /files/5
http-8087-Processor15, 25-Jul-2005 06:55:35, root, CHECKOUT, 200 "OK", 461 
ms, /files/5/doc.APPL.tif
25 Jul 2005 06:55:35 - 
org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter - ERROR - 
java.io.IOException: ORA-08177: can't serialize access for this transaction

java.io.IOException: ORA-08177: can't serialize access for this transaction
at oracle.jdbc.dbaccess.DBError.SQLToIOException(DBError.java:716)
at oracle.jdbc.driver.OracleBlobOutputStream.flushBuffer(
OracleBlobOutputStream.java:279)
at oracle.jdbc.driver.OracleBlobOutputStream.flush(
OracleBlobOutputStream.java:215)
at org.apache.slide.store.impl.rdbms.OracleRDBMSAdapter.storeContent(
OracleRDBMSAdapter.java:157)
at 
org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.storeRevisionContent(
StandardRDBMSAdapter.java:1113)
at 
org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.storeRevisionContent(
StandardRDBMSAdapter.java:1077)
at org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.storeRevisionContent
(AbstractRDBMSStore.java:852)
at org.apache.slide.store.AbstractStore.storeRevisionContent(
AbstractStore.java:1560)
at org.apache.slide.store.ExtendedStore.storeRevisionContent(
ExtendedStore.java:551)
at org.apache.slide.content.ContentImpl.store(ContentImpl.java:1017)




-- 
Best Regards,
Muhammad Alsebaey


Re: Oracle Store Serialization problem

2005-07-25 Thread Muhammad Al Sebaeyie
Sorry Correction,
the document names don't change, they stay the same, this was IE/Win XP 
Share playing tricks...

On 7/25/05, Muhammad Al Sebaeyie <[EMAIL PROTECTED]> wrote:
> 
> Hi All
> We Setup an oracle store on Slide 2.1 Release and then Later 2.2 (latest 
> from head) working off an oracle JDBC store, after much problems (discussed 
> somewhere here too ) we contacted oracle and they suggested an upgrade from 
> 9.2.0.1  to 9.2.0.5 
> which made the problem go away, but now I'm hit with multiple 'cant 
> serialize access to transaction errors'. I've tried to overcome that by 
> making the application retry multiple times. But this happens a LOT, on PUT, 
> CHECKOUT, CHECKIN, VERSIONCONTROL, and doesnt have a pattern... and a weird 
> side effect is that docs get renamed by slide from doc.txt to doc[5].txt 
> or doc[3].txt or the like. 
> There is a firewall between the db server and the slide webserver...
> Does this have to do with caching or delay from the firewall?
> 
> here is part of my stack trace:
> http-8087-Processor22, 25-Jul-2005 06:54:42, root, PROPFIND, 207 
> "Multi-Status", 10 ms, /files/5/doc.APPL.tif
> http-8087-Processor22, 25-Jul-2005 06:54:42, root, GET, 200 "OK", 73 ms, 
> /files/5/doc.APPL.tif
> http-8087-Processor22, 25-Jul-2005 06:54:42, root, PROPFIND, 207 
> "Multi-Status", 11 ms, /files/5/doc.APPL.tif
> http-8087-Processor22, 25-Jul-2005 06:54:42, root, PROPFIND, 207 
> "Multi-Status", 9 ms, /files/5/doc.APPL.tif
> http-8087-Processor22, 25-Jul-2005 06:54:42, root, PROPFIND, 207 
> "Multi-Status", 10 ms, /files/5/doc.APPL.tif
> http-8087-Processor22, 25-Jul-2005 06:54:42, root, PROPFIND, 207 
> "Multi-Status", 10 ms, /files/5/doc.APPL.tif
> http-8087-Processor22, 25-Jul-2005 06:54:42, root, PROPFIND, 207 
> "Multi-Status", 10 ms, /files/5/doc.APPL.tif
> http-8087-Processor22, 25-Jul-2005 06:54:42, root, PROPFIND, 207 
> "Multi-Status", 10 ms, /files/5/doc.APPL.tif
> http-8087-Processor18, 25-Jul-2005 06:55:34, root, PROPFIND, 207 
> "Multi-Status", 10 ms, /files/5
> http-8087-Processor22, 25-Jul-2005 06:55:34, root, PROPFIND, 207 
> "Multi-Status", 10 ms, /files/5
> http-8087-Processor15, 25-Jul-2005 06:55:34, root, PROPFIND, 207 
> "Multi-Status", 11 ms, /files/5
> http-8087-Processor15, 25-Jul-2005 06:55:35, root, CHECKOUT, 200 "OK", 461 
> ms, /files/5/doc.APPL.tif
> 25 Jul 2005 06:55:35 - 
> org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter - ERROR - 
> java.io.IOException: ORA-08177: can't serialize access for this 
> transaction
> 
> java.io.IOException: ORA-08177: can't serialize access for this 
> transaction
> at oracle.jdbc.dbaccess.DBError.SQLToIOException(DBError.java:716)
> at oracle.jdbc.driver.OracleBlobOutputStream.flushBuffer(
> OracleBlobOutputStream.java:279)
> at oracle.jdbc.driver.OracleBlobOutputStream.flush(
> OracleBlobOutputStream.java:215)
> at org.apache.slide.store.impl.rdbms.OracleRDBMSAdapter.storeContent(
> OracleRDBMSAdapter.java:157)
> at 
> org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.storeRevisionContent
> (StandardRDBMSAdapter.java:1113)
> at 
> org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.storeRevisionContent
> (StandardRDBMSAdapter.java:1077)
> at 
> org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.storeRevisionContent(
> AbstractRDBMSStore.java:852)
> at org.apache.slide.store.AbstractStore.storeRevisionContent(
> AbstractStore.java:1560)
> at org.apache.slide.store.ExtendedStore.storeRevisionContent(
> ExtendedStore.java:551)
> at org.apache.slide.content.ContentImpl.store(ContentImpl.java:1017)
> 
> 
> 
> 
> -- 
> Best Regards,
> Muhammad Alsebaey 




-- 
Best Regards,
Muhammad Alsebaey


Re: My "dirty" solution to set non-inheritable privileges using webdav client

2005-07-25 Thread Maximo Gurmendez
This is my domain, for you to check. I'm using slide 2.1 with SQLServer and 
file store.


Hope it helps.

Maximo



   
   
   
 
   classname="org.apache.slide.store.impl.rdbms.JDBCStore">
  name="adapter">org.apache.slide.store.impl.rdbms.SQLServerRDBMSAdapter
   name="driver">com.microsoft.jdbc.sqlserver.SQLServerDriver
   name="url">jdbc:microsoft:sqlserver://zeus:1433;DatabaseName=slide;SelectMethod=Cursor

   true
   name="maxPooledConnections">40
   name="isolation">READ_UNCOMMITTED

   admin
   ***

   
 false
   
   
   
   
   
   
   
   
   
   
   
   
   classname="org.apache.slide.store.txfile.TxFileContentStore">
   name="rootpath">d:/academic/fs/store/content
   name="workpath">d:/academic/fs/work/content

   
   
   
   
   
   
   /actions/read
   /actions/write
   /actions/write
   /actions/write-acl
   /actions/write-acl
   /actions/read-acl
   
/actions/read-current-user-privilege-set
   /actions/write
   /actions/unlock
   /actions/read
   /actions/read
   
/actions/write-properties
   
/actions/write-properties
   
/actions/write-properties
   /actions/read
   
/actions/write-content
   
/actions/write-content
   
/actions/write-content
   /actions/bind
   /actions/unbind
   
   /users
   /roles
   /actions
   /files
   true
   true
   path
   root
   user
class="org.apache.slide.content.WebFolderContentInterceptor"/>

   
   
   uri="/">

   
   inheritable="true"/>
   inheritable="true" negative="true"/>
   inheritable="true" negative="true"/>
   inheritable="true" negative="true"/>
   

   
   classname="org.apache.slide.structure.SubjectNode" uri="/users">
   inheritable="true"/>
   inheritable="true" negative="true"/>

   
   classname="org.apache.slide.structure.SubjectNode" uri="/users/root">

   
   namespace="http://jakarta.apache.org/slide/"; name="password">

   
   
   
   classname="org.apache.slide.structure.SubjectNode" uri="/users/mgurmend">

   
   namespace="http://jakarta.apache.org/slide/"; name="password">

   
   
   classname="org.apache.slide.structure.SubjectNode" uri="/users/john2">

   
   namespace="http://jakarta.apache.org/slide/"; name="password">

   
   
   
   classname="org.apache.slide.structure.SubjectNode" uri="/users/guest">

   
   namespace="http://jakarta.apache.org/slide/"; name="password">

   
   
   
   
   classname="org.apache.slide.structure.SubjectNode" uri="/roles">
   inheritable="true"/>
   inheritable="true" negative="true"/>
   classname="org.apache.slide.structure.SubjectNode" uri="/roles/root">

   
   name="group-member-set">

   
   
   classname="org.apache.slide.structure.SubjectNode" uri="/roles/user">

   
   name="group-member-set">

   
   
   classname="org.apache.slide.structure.SubjectNode" uri="/roles/guest">

   
   name="group-member-set">

   
   
classname="org.apache.slide.structure.SubjectNode" uri="/roles/student"/>
classname="org.apache.slide.structure.SubjectNode" uri="/roles/teacher"/>
classname="org.apache.slide.structure.SubjectNode" uri="/roles/parent"/>

   
   
   classname="org.apache.slide.structure.ActionNode" uri="/actions">
   classname="org.apache.slide.structure.ActionNode" uri="/actions/read">

   
   name="privilege-member-set">

   

GetMethod and content length

2005-07-25 Thread Michael Oliver








Currently the org.apache.slide.webdav.method.GetMethod()
sets 

 

resp.setContentLength

   
((int) revisionDescriptor.getContentLength());

 

Which was set and maintained in the revisionDescriptor
when the resource was put.

 

I need to return some dynamic content from
a query as a resource, so I need the resp.setContentLength to be the actual
length of the stream read and not the value from the resource that was put
(which was an xml document with the query).

 

I need to override the GetMethod from

 

private IOException copyRange(InputStream istream,

 
ServletOutputStream ostream) {

 

   
// Copy the input stream to the output stream

    IOException
exception = null;

    byte
buffer[] = new byte[input];

    int
len = buffer.length;

    while
(true) {

   
try {

   
len = istream.read(buffer);

   
if (len == -1)

   
break;

   
ostream.write(buffer, 0, len);

    }
catch (IOException e) {

   
exception = e;

   
len = -1;

   
break;

   
}

   
}

    return
exception;

 

    }

 

to 

 

private IOException copyRange(InputStream istream,

    ServletOutputStream
ostream) {

 

    //
Copy the input stream to the output stream

    IOException
exception = null;

    byte
buffer[] = new byte[input];

    int
len = buffer.length;

    int
contentLength = 0;

    while
(true) {

    try
{

    len
= istream.read(buffer);

    if
(len == -1)

    break;

    ostream.write(buffer,
0, len);

    contentLength
+= len;

    }
catch (IOException e) {

    exception
= e;

    len
= -1;

    break;

    }

    }

    this.resp.setContentLength(contentLength);

    return
exception;

 

    }

 

}

 

So the response content length is the same
as the length of the stream read.

 

So the question is, what is the best
practice for overriding a slide method?

 


 
  
  
   


 
  
  
   




Loosely Coupled

   
  
  
  
  
   
  
 
 
  
  
   

Mike Oliver
CTO 


Alarius Systems LLC
6800 E. Lake Mead Blvd
Apt 1096
Las Vegas, NV 89156 

   
   

[EMAIL PROTECTED]
[EMAIL PROTECTED]
IM: [EMAIL PROTECTED]
http://www.alariussystems.com/




 
  
  tel: 
  fax: 
  mobile: 
  
  
  (702)643-7425
  (702)974-0341
  (518)378-6154 
  
 



   
  
  
  
 




 

   
  
  
  
 
 
  
  
   

Add me to your address book...


Want a signature like
this?

   
  
  
  
 


 








SocketTimeoutException during search

2005-07-25 Thread Sam Perman
I have slide deployed on Weblogic 8.1.  I can browse /slide/files from a  
browser but when I send xml up for a search I get a  
SocketTimeoutException.  I'll paste the exception at the end of this  
message.


Has anyone seen this before?

thanks
sam

Read timed out
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at  
weblogic.servlet.internal.PostInputStream.read(PostInputStream.java:133)
at  
weblogic.servlet.internal.ServletInputStreamImpl.read(ServletInputStreamImpl.java:168)
at  
weblogic.apache.xerces.impl.XMLEntityManager$RewindableInputStream.read(XMLEntityManager.java:3408)
at  
weblogic.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:847)
at  
weblogic.apache.xerces.impl.XMLEntityManager.startDocumentEntity(XMLEntityManager.java:782)
at  
weblogic.apache.xerces.impl.XMLDocumentScannerImpl.setInputSource(XMLDocumentScannerImpl.java:260)
at  
weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:499)
at  
weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
at  
weblogic.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at  
weblogic.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
at  
weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)
at  
weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:152)

at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:770)
at  
org.apache.slide.webdav.method.AbstractWebdavMethod.parseRequestContent(AbstractWebdavMethod.java:906)
at  
org.apache.slide.webdav.method.SearchMethod.getQueryElement(SearchMethod.java:272)
at  
org.apache.slide.webdav.method.SearchMethod.parseRequest(SearchMethod.java:117)
at  
org.apache.slide.webdav.method.AbstractWebdavMethod.run(AbstractWebdavMethod.java:382)
at  
org.apache.slide.webdav.WebdavServlet.service(WebdavServlet.java:151)




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re: Which event to listen for?

2005-07-25 Thread Brandon Dove
OK, so I've updated to a head build and now am working with code
that includes the DetailedWebdavListener and WebdavAdapter. My
listener now implements the putAfter() method, but I'm seeing
the same problem I was experiencing before: 

When the putAfter() event occurs the content has not been stored
in the Slide repository and thus I cannot get an InputStream
from it.

Any suggestions?

Cheers,

Brandon



 On Mon, 25 Jul 2005, Thomas Bellembois
([EMAIL PROTECTED]) wrote:

> Hi,
> 
> Have you tried with the DetailedWebdavListener ? The
"putAfter" event is 
> thrown just after a resource is put on the server.
> You should be able to retrieve your inputStream using the
WebdavEvent.
> 
> Hope it helps.
> 
> Thomas
> 
> 
> Brandon Dove wrote:
> 
> >Hi -- I'm writing some code that will:
> >
> >1. Extended ContentAdaptor to listen for "create"
ContentEvents.
> >2. Determine if the resource being created is an image.
> >3. Get an InputStream from that resource to do some further
> >processing of the image.
> >
> >The problem I've run into is that I'm notified of the
"create"
> >event, but at this point the resource doesn't actually exist
in
> >the slide repository so attempting to get an InputStream from
> >that resource is useless. I've tried listening for other
> >ContentEvents like "store" but they seem to have the same
> >result. What event should I be listening for in this
situation?
> >
> >Thanks again for your help.
> >
> >Cheers,
> >
> >Brandon
> >
> >
> >Get your own "800" number
> >Voicemail, fax, email, and a lot more
> >http://www.ureach.com/reg/tag
> >
>
>-
> >To unsubscribe, e-mail:
[EMAIL PROTECTED]
> >For additional commands, e-mail:
[EMAIL PROTECTED]
> >
> >
> >  
> >
> 
> 
> -- 
> +---=(Thomas Bellembois)=---+
> | CRI - University of Rennes 1 - FR |
> | [EMAIL PROTECTED] |
> | +33 2 23 23 69 60 |
> +---+
> 
> 
>
-
> To unsubscribe, e-mail:
[EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]
> 
> 
> 



Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Windows XP mapping

2005-07-25 Thread Tobias Maier


> Rakesh Saha <[EMAIL PROTECTED]> wrote:
> 
> For me http://jakarta.apache.org/slide/xp.html works [ I am working with 
> Jetty although ] .

Well, this method doesn't add a drive, but only a network place.
How can I e.g. access this place with Java?
And this networkplace only allows me to copy, move and delete object, not to
open them. When you double click a .exe file it is first copied into a
temporary folder and then executed.
So I hope there are other solutions how I can map it to a drive letter...


> 
> HTH.
> Thanks,
> rakesh
> 
> Tobias Maier wrote: 
> >In February there was a discussion about mapping WebDAV to WinXP.
> >One guy posted a solution to that problem, but I don't get it work.
> >Does anyone know if I need a special config file for tomcat server and
> >slide?
> >Or is it a windows config problem?
> >
> >Thanks for any help...
> >regards Tobias 

-- 
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse f�r Mail, Message, More +++

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Windows XP mapping

2005-07-25 Thread Sven Pfeiffer
there was a duscussion about this a few month ago, in February this year.

try to search the mailinglist archive for "Windows XP mapping" and "Microsoft 
WebDAV Redirector problem (net use) and how to fix
it".

hth
SVen

>-Original Message-
>From: Tobias Maier [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, July 26, 2005 8:39 AM
>To: Slide Users Mailing List
>Cc: slide-user@jakarta.apache.org
>Subject: Re: Windows XP mapping
>
>
>
>
>> Rakesh Saha <[EMAIL PROTECTED]> wrote:
>>
>> For me http://jakarta.apache.org/slide/xp.html works [ I am working with
>> Jetty although ] .
>
>Well, this method doesn't add a drive, but only a network place.
>How can I e.g. access this place with Java?
>And this networkplace only allows me to copy, move and delete object, not to
>open them. When you double click a .exe file it is first copied into a
>temporary folder and then executed.
>So I hope there are other solutions how I can map it to a drive letter...
>
>
>>
>> HTH.
>> Thanks,
>> rakesh
>>
>> Tobias Maier wrote:
>> >In February there was a discussion about mapping WebDAV to WinXP.
>> >One guy posted a solution to that problem, but I don't get it work.
>> >Does anyone know if I need a special config file for tomcat server and
>> >slide?
>> >Or is it a windows config problem?
>> >
>> >Thanks for any help...
>> >regards Tobias
>
>--
>5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
>+++ GMX - die erste Adresse fo?=r Mail, Message, More +++
>
>-
>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]