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 Khue Nguyen <ho...@infomaniak.ch> on 2001/12/04 14:47:30 UTC

how to push a file through the web browser

Hi all,

I'm new to Slide and try to use Slide as a Web based filemanager to be integrated in a Portal Server.
Is there any example of how to push a file on the server through the web browser ?


Khue Nguyen

Web Developer
www.jahia.org

Re: how to push a file through the web browser

Posted by Dirk Verbeeck <di...@pandora.be>.
Or have a look at jakarta-slide\src\examples\multithread\TestThread.java


Dirk Verbeeck wrote:
> 
> There is no ready to use example, the best thing you can do is
> have a look at org.apache.slide.webdav.method.PutMethod
> it does something like:
> - look up the revisionDescriptors for a subject (~your url)
> - create/reuse a revisionDescriptor for your new content
> - set properties
> - create and set the content on a revisionContent object
> - put your content where it belongs
> content.create(slideToken, resourcePath,
> revisionDescriptor,revisionContent);
> 
> Dirk
> 
> Khue Nguyen wrote:
> >
> > Hi all,
> >
> > I'm new to Slide and try to use Slide as a Web based filemanager to be integrated in a Portal Server.
> > Is there any example of how to push a file on the server through the web browser ?
> >
> > Khue Nguyen
> >
> > Web Developer
> > www.jahia.org
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


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


Re: how to push a file through the web browser

Posted by Jean-Philippe Courson <co...@noos.fr>.
> Khue Nguyen wrote:
> 
>Hi all,
>
>I'm new to Slide and try to use Slide as a Web based filemanager to be integrated in a Portal Server.
>Is there any example of how to push a file on the server through the web browser ?


To send the files to the web server, you will have to :

-> For the client :
    Use an html form with an enctype set to multipart/form-data and with
    one (or more) input type='file'

    Example :
    <html>
    <form action='...' method='post' enctype='multipart/form-data'>
    <input type='file' name='file1'><br>
    <input type='file' name='file2'><br>
    <input type='submit'>
    </form>
    </html>

-> For the server :
    Write or use a class that deals with multipart requests.
    You can find a good example at http://www.servlets.com/cos/ but to 
be
    allowed to use it, all developpers in your company must buy the
    lastest edition of the book Java Servlet Programming from OReilly.

JP


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


WebDAV resource URI mapping

Posted by Khue Nguyen <kn...@xo3.com>.
Thanks Dirk for those information,

Actually I'm be able to extends the webdav servlet to have a webApp I can
deploy several time in different context. They run just like the default one
but with separate Domain.xml , namespace and content store.

Do you think it is simplier to modify the default implementation of the
webdav servlet in a way that webdav resource URI have a particular mapping,
i.e : http://server:port/slide/"webdavRes"/files , instead of
http://server:port/slide/files ? Doing so, simple images can be served by
the http server and particular URI like http://server:port/slide/action.do
can be mapped to a struts Servlet in the same context ?
Or do you think it is simplier to have a WebApp WebDAV client in another
context that connect to the previous Webdav server WebApp by using the http
webdav client routines ( as the cmd line example ) ?

Khue

 Web Developer
 www.jahia.org



----- Original Message -----
From: "Dirk Verbeeck" <di...@pandora.be>
To: "Slide Users List" <sl...@jakarta.apache.org>
Sent: Monday, December 17, 2001 11:52 PM
Subject: Re: how to push a file through the web browser


> There is no ready to use example, the best thing you can do is
> have a look at org.apache.slide.webdav.method.PutMethod
> it does something like:
> - look up the revisionDescriptors for a subject (~your url)
> - create/reuse a revisionDescriptor for your new content
> - set properties
> - create and set the content on a revisionContent object
> - put your content where it belongs
> content.create(slideToken, resourcePath,
> revisionDescriptor,revisionContent);
>
>
> Dirk
>
>
> Khue Nguyen wrote:
> >
> > Hi all,
> >
> > I'm new to Slide and try to use Slide as a Web based filemanager to be
integrated in a Portal Server.
> > Is there any example of how to push a file on the server through the web
browser ?
> >
> > Khue Nguyen
> >
> > Web Developer
> > www.jahia.org
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
>



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


Re: how to push a file through the web browser

Posted by Dirk Verbeeck <di...@pandora.be>.
There is no ready to use example, the best thing you can do is
have a look at org.apache.slide.webdav.method.PutMethod
it does something like:
- look up the revisionDescriptors for a subject (~your url)
- create/reuse a revisionDescriptor for your new content
- set properties
- create and set the content on a revisionContent object
- put your content where it belongs
content.create(slideToken, resourcePath,
revisionDescriptor,revisionContent);


Dirk


Khue Nguyen wrote:
> 
> Hi all,
> 
> I'm new to Slide and try to use Slide as a Web based filemanager to be integrated in a Portal Server.
> Is there any example of how to push a file on the server through the web browser ?
> 
> Khue Nguyen
> 
> Web Developer
> www.jahia.org


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