I do the all the time using MultipartRequest from "Java Servlet Programming"
by Jason Hunter. A good example and discussion is on page 107.
Basically, you use the <Input type=File ...> tag in your HTML form, then
read in your servlet by instantiating Multipart request and invoking it's
file handling methods.
Good Luck,
Chris Burkhardt
Partner
1BigThink
on 9/13/00 3:32 PM, Dan Oestberg at [EMAIL PROTECTED] wrote:
> I'm writing a servlet where the client is supposed to
> feed data in order to create a web shop owned and run
> by the client.
>
> (Form) data as "what's the name of the product?",
> "what's the product number?", "what's the price?"
> etc are easy to transfer to the DB and return as
> part of the client's FrontStore pages to his/her customers.
>
> But when it comes to "add a picture of the product" I'm
> in real trouble...
> ....the gifs and jpegs are located on the client's harddisk
> and I'm of course not allowed to transfer a e.g. .gif-file
> from the localhost to 'my' server!
>
> As I have seen many times on the web that it's possible to
> present all my own directories, subdirectories and files
> (browse...) for a choice I just wonder: How do they do it?
> And can it be built-in in a servlet?
> -dan
> PS Of course, I could ask my clients to transfer the files
> via ftp but that seems to be too much ask...isn't it?
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html