struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wendy Cameron" <>
Subject Files upload and inserting in database
Date Mon, 02 Dec 2002 04:26:51 GMT
I have a really simple question regarding, I understand that the database needs a file input
stream using the following as an example of putting a file in the database:

File file = new File("myimage.gif");
FileInputStream fis = new FileInputStream(file);
PreparedStatement ps = conn.prepareStatement("INSERT INTO images VALUES (?, ?)");
ps.setString(1, file.getName());
ps.setBinaryStream(2, fis, file.length());

However I dont know what type the Bean object property should be in order to allow RequestUtils
to automatically  populate the bean property when multipart form content is used
thanks Wendy

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message