You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Christopher Lenz <cm...@gmx.de> on 2002/01/26 14:06:40 UTC

Re: RE: Attn Developers - org.apache.slide.webdav.WebdavServletConfi g

24.01.2002 20:35:16, Frederic Kam-Thong <Fr...@invera.com> wrote:

>I'd like to implement a servlet that does the following:
> - Handle http file uploads as per RFC 1867
> - Execute a PUT without having to go through a HTTPClient
>for a web-based DAV client.

I don't understand the second point, could you explain 
more precisely ?

>I was dissecting the WebdavServlet hoping gain some insight.
>It was then that I noticed that all the constructors in
>org.apache.slide.webdav.method.*
>need an instance of WebdavServletConfig as one of their parameter.
>
>FYI - So far, I've subclassed WebdavServlet and implemented a JSP
>template-based directory browser but the bytecode could be leaner if 
>I didn't subclass...

I've done pretty much the same thing half a year ago :)
You'll *need* to subclass WebdavServlet to implement doGet(), 
which should forward() to the JSP page(s).

>Anyway, this upload/PUT servlet is a different beast.

Well, I would recommend making a custom PostMethod 
implementation to handle the file uploads. In your 
WebdavServlet subclass, you override createWebdavMethod() 
to handle the instantiation of you method class if the 
method is "POST", and let super handle all the other 
methods.

For the implementation of the PostMethod you can look
at the code of PutMethod, as it will be pretty similar, 
except for the additional complexities of handling the
multipart response body.

>Any idea as to how I could implement this upload/PUT servlet (besides
>modifying the Slide code...)? 
>
>Thanks!
>
>  Frederic
>
>
>-----Original Message-----
>From: Christopher Lenz [mailto:cmlenz@gmx.de]
>Sent: Thursday, January 24, 2002 14:02
>To: Slide Users List
>Subject: Re: Attn Developers -
>org.apache.slide.webdav.WebdavServletConfig
>
>
>24.01.2002 19:33:34, Frederic Kam-Thong <Fr...@invera.com> wrote:
>>Hi,
>>
>>Is there a reason why org.apache.slide.webdav.WebdavServletConfig's
>>constructor is not public?
>
>Yeah, because only WebdavServlet is intended to create instances of 
>the config class. Why should it be public ? What do you want to do ?

-chris
________________________________________________________________
cmlenz at gmx.de



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>