나는 데이터베이스에 Doc 파일을 업로드하기위한 jsp, servlet 코드를 작성했다.java.io.FileNotFoundException?
여기에 내 코드가 있지만이 같은 오류가 발생하고 있습니다 == java.io.FileNotFoundException : (파일 이름, 디렉터리 이름 또는 볼륨 레이블 구문이 올바르지 않습니다) 값 (?) 다시 시작 (?) 삽입? 이 오류를 제거하는 방법을 알려주세요 ???
try
{
Class.forName("net.sourceforge.jtds.jdbc.Driver").newInstance();
con=DriverManager.getConnection("jdbc:jtds:sqlserver://W2K8SERVER:1433/career","sa","Alpha#123");
pst = con.prepareStatement("select * from data1 where email=? and password=?");
pst = con.prepareStatement
("insert into resume(resume) "+ "values(?)");
File re = new File("" + pst);
fis = new FileInputStream(re);
pst.setBinaryStream(3, (InputStream)fis, (int)(re.length()));
pst.setString (1,upload);
//rs = pst.executeQuery();
while (rs.next())
cnt ++;
int s = pst.executeUpdate();
if(s>0) {
System.out.println("Uploaded successfully !");
}
else {
System.out.println("unsucessfull to upload image.");
}
rs.close();
pst.close();
con.close();
}
가능한 [SQL Server 2008에 텍스트 또는 문서 파일을 보내기위한 서블릿] (http://stackoverflow.com/questions/5336295/servlet-for-sending-the-text-or-document-file- to-the-sql-server-2008) – BalusC