一个文件上传的有关问题,来看下!

一个文件上传的问题,高手进来看下!!
在jsp页面有个 <input   type= "file "   name= "file "> ,请问我怎么在action里面获得,并保存到oracle数据库中的blob字段中去,file里面放的是一个word控件生成的文件,不是浏览打开的那种.
哪位知道怎么解决的?

------解决方案--------------------
应该在本地先保存副本然后在上传吧
------解决方案--------------------
<form name= "form1 " method= "post " action= "../upload/upload.do?method=addFile " enctype= "multipart/form-data " >

1.你在actionForm 里面 首先定义 private FormFile file;
2.在action 里面把 myform.getFile().getFileName() 就可以取出文件名称了.
3.因为你得信息都在form表单里面 只要submit后 去表单里面取出就可以了
------解决方案--------------------
4.存入数据库里面 只要 取出来了.就能存里面了.不清楚你用得是什么框架.只要往数据库里面 set就可以
------解决方案--------------------
我是这样获得的:

// 获得服务器应用程序所在的绝对路径
String realPath = servlet.getServletContext().getRealPath(servlet.getServletName());
realPath = realPath.substring(0, realPath.lastIndexOf( "\\ "));
String uploadPath = realPath + "\\upload\\ "; // 用于存放上传文件的服务器目录绝对路径

// 创建存放文件目录
File uploadPathDir = new File(uploadPath);
if (!uploadPathDir.exists())
{
uploadPathDir.mkdirs();
}