how to store and retrieve doc and pdf files from data base using struts2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sabzar
    New Member
    • Aug 2010
    • 1

    how to store and retrieve doc and pdf files from data base using struts2

    Hi every buddy.. i need to store resume in mysql data base and also retrieve to display it in jsp page .what the data type should i use for database. i tried it as a blob type. and in action class i tried to store it as
    String fn="file path ......";
    File file = new File(fn);
    fis = new FileInputStream (file);
    ps=conn.prepare Statement("inse rt into filetable(FileN ame) values(?)");

    ps.setBinaryStr eam(1, fis, (int) file.length());
    also i tried
    ps.setAsciiStre am(1, fis, (int) file.length());

    .. pls help me out
Working...