For a pure HTML solution you need two things:

a form with at least one file input tag:

<form enctype="multipart/form-data" action=<%=
response.encodeUrl("'path-to-your-servlet'") %> method="post">
<input type="file" name="FileData" value="" size="52" maxlength="255">
</form>

and a servlet that uses a MultiPartRequest (http://www.servlets.com/cos/)


> -----Ursprüngliche Nachricht-----
> Von: Christoph Kukulies [mailto:[EMAIL PROTECTED]]
> Gesendet: Freitag, 20. April 2001 17:18
> An: [EMAIL PROTECTED]
> Betreff: file upload servlet
> 
> 
> 
> Is there an example somewhere for a servlet that allows for uploading
> and processing a file.
> 
> Scenario: client (browser side) has edited a file with some 
> information
> or some kind of excel or Word document and need to get that processed.
> 
> The idea is to simply drag and drop the document into the 
> broswer window
> and upload it to the server fopr processing.
> If that's too complicated (e.g. requiring swing or something)
> it would be sufficient if the client could be advised to 
> open some kind of file selector or browser to select the file 
> to be uploaded
> and send it upstream.
> 
> What requisites would be required for this?
> 
> 
> -- 
> Chris Christoph P. U. Kukulies [EMAIL PROTECTED]
> 
> 

Reply via email to