tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Amann" <c.am...@ac-multimedia.de>
Subject RE: How to upload a binary file?
Date Tue, 19 Jun 2001 16:00:30 GMT
Hi,

I am sorry that I don't have time to read your sourcecode completely, but
there is a very simple solution to upload files to a servlet or a jsp. There
is a special package from oreilly.com for uploading files of different
content-types from a browser.
In my JSP I have just one line that can do this:

import com.oreilly.servlet.*;

...in the doGet or doPost method:

MultipartRequest multi = new MultipartRequest(request, filename);

"filename" is the path where you want to save the uploaded file. There are
much more cool things you can do with the oreilly-package. Just visit
http://www.servlets.com/jservlet/examples/ch04/index.html#ex04_17 for an
example.

Good Luck :)

Christian Amann

Mime
View raw message