oh, I see. that's something the servlet api doesn't do for you. to parse a 
multipart request (that's what you use for file-upload) all you get is an 
input stream that you can parse which you have to decode. however there are 
plenty of utilities that do this for you. one is even shipped with orion.

check the api docs for FilePostParser. there is a source example of how to 
use it.

just get the request input stream, apply the parser to it (again gives you 
input stream on the decoded data items) and store copy the data from the 
input stream to a file.

remember to set the form enctype to multipart/form-data.

that should be all you need to get going.

robert

At 17:33 12.11.00 , you wrote:
>I'm using the HTML form <input type="file" name="my_file"> to upload
>my compiled class file. When I try to get the file in the servlet, using:
>
>File f = (File)request.getParameter("my_file");
>
>It does not work. I need to get the class file, generate an object of it and
>then execute some methods.
>
>How can I do this?
>
>[]s
>Guilherme Ceschiatti
>[EMAIL PROTECTED]

(-) Robert Krüger
(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665401, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de


Reply via email to