Possible Duplicate:
How to upload files to server using JSP/Servlet?
I wrote this code in jsp to send a file to a Servlet:
<input type="file" name="inputFoto" id="inputFoto"/>
and my Servlet is:
{...
File fotoImg = (File) request.getAttribute("inputFoto");
byte[] foto = convertiInArrayByte(fotoImg);
..}
It does not work. How can I get a file in a Servlet from a JSP? Can someone help me? Maybe there are some problems with the path of the file (on my pc)!?!?