como fazer upload de fotos com jsp? tenho as seguintes pagina mas nao funcionam
<%@ page contentType=“text/html” language=“java” import=“java.sql.*” %>
<html>
<head>
<title>Documento sem título</title>
<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1”>
</head>
<body>
<form action=“recebendofoto.jsp” method=“post” enctype=“multipart/form-data” name=“form1”>
<table width=“100%” border=“1”>
<tr>
<td width=“30%”><input type=“file” name=“arquivo”></td>
<td width=“70%”><input type=“submit” name=“Submit” value=“Enviar”></td>
</tr>
</table>
</form>
</body>
</html>
<%@ page contentType=“text/html” language=“java” import=“java.sql.*” %>
<html>
<head>
<title>Documento sem título</title>
<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1”>
</head>
<body>
<%
String url=“jdbc:odbc:magal”;
String usuario="";
String senha="";
Connection con;
final String driver="sun.jdbc.odbc.JdbcOdbcDriver";
try {
Class.forName(driver);
out.println("carregei o driver");
con = DriverManager.getConnection(url,usuario,senha);
out.println("conseguri conectar ");
Statement st=con.createStatement();
out.println("passei da qui");
st.executeUpdate("insert into fotos(foto)values(LOAD_FILE("arquivo")"); //o erro eh nesta linha
st.close();
con.close();
out.println("sucesso");
}catch(Exception e)
{
out.println("erro ");
}
%>
</body>
</html>
meu email: [email removido]
obrigado