You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by imadhusudhanan <ma...@gmail.com> on 2009/02/22 11:03:10 UTC
Response for put request ...
Dear All,
I have a Warning in the windows client saying "An error while copying some or all the files". I had extended the SimpleWebDavServlet and written a custom doPut() method that overrides that of the AbstractWebdavServlet so that any put request is redirected to my FileStore instead staying in JackRabbit repository. But as a response I use the following code ...
DavPropertyNameSet dns = new DavPropertyNameSet();
dns.add(DavPropertyName.DISPLAYNAME);
dns.add(DavPropertyName.CREATIONDATE);
MultiStatusResponse msr = new MultiStatusResponse(resource, dns);
MultiStatus ms = new MultiStatus();
ms.addResponse(msr);
response.sendMultiStatus(ms);
I hope it sends a multi - status response, but I get that error warning in windows WebFolders client and nothing shown. Any suggestions how I do I send a response for doPut() after a successful upload ??
Regards,
Madhu.
Re: Response for put request ...
Posted by Julian Reschke <ju...@gmx.de>.
imadhusudhanan wrote:
>
> Sorry if thats so foolish. Kindly apologize. I m a newbie to JackRabbit
> and learning the same. May I know which response I may deliver so that I
> client says OK. take care.
>
> Regards,
> Madhu.
PUT is defined in RFC 2616, so the answer is there (for instance, 200
when updating an existing resource, or 201 when creating a new one).
BR, Julian
Re: Response for put request ...
Posted by imadhusudhanan <ma...@gmail.com>.
Sorry if thats so foolish. Kindly apologize. I m a newbie to JackRabbit and learning the same. May I know which response I may deliver so that I client says OK. take care.
Regards,
Madhu.
---- On Sun, 22 Feb 2009 04:35:23 -0800 Julian Reschke <ju...@gmx.de> wrote ----
> imadhusudhanan wrote:
> > Dear All,
> >
> > I have a Warning in the windows client saying "An error while
> > copying some or all the files". I had extended the SimpleWebDavServlet
> > and written a custom doPut() method that overrides that of the
> > AbstractWebdavServlet so that any put request is redirected to my
> > FileStore instead staying in JackRabbit repository. But as a response I
> > use the following code ...
> >
> > DavPropertyNameSet dns = new DavPropertyNameSet();
> > dns.add(DavPropertyName.DISPLAYNAME);
> > dns.add(DavPropertyName.CREATIONDATE);
> > MultiStatusResponse msr = new
> > MultiStatusResponse(resource, dns);
> > MultiStatus ms = new MultiStatus();
> > ms.addResponse(msr);
> > response.sendMultiStatus(ms);
> >
> > I hope it sends a multi - status response, but I get that error
> > warning in windows WebFolders client and nothing shown. Any suggestions
> > how I do I send a response for doPut() after a successful upload ??
>
> I'd be surprised if any client accepts a 207 (Multistatus) as a response
> to a successful PUT.
>
> Best regards, Julian
Re: Response for put request ...
Posted by Julian Reschke <ju...@gmx.de>.
imadhusudhanan wrote:
> Dear All,
>
> I have a Warning in the windows client saying "An error while
> copying some or all the files". I had extended the SimpleWebDavServlet
> and written a custom doPut() method that overrides that of the
> AbstractWebdavServlet so that any put request is redirected to my
> FileStore instead staying in JackRabbit repository. But as a response I
> use the following code ...
>
> DavPropertyNameSet dns = new DavPropertyNameSet();
> dns.add(DavPropertyName.DISPLAYNAME);
> dns.add(DavPropertyName.CREATIONDATE);
> MultiStatusResponse msr = new
> MultiStatusResponse(resource, dns);
> MultiStatus ms = new MultiStatus();
> ms.addResponse(msr);
> response.sendMultiStatus(ms);
>
> I hope it sends a multi - status response, but I get that error
> warning in windows WebFolders client and nothing shown. Any suggestions
> how I do I send a response for doPut() after a successful upload ??
I'd be surprised if any client accepts a 207 (Multistatus) as a response
to a successful PUT.
Best regards, Julian