如何通过struts以oci协议将文件上传到oracle数据库的blob字段

类别:VC语言 点击:0 评论:0 推荐:

Class文件如下:

import java.io.*;
import java.sql.*;
import java.util.Date ;
import oracle.sql.*;
import javax.servlet.http.*;
import org.apache.struts.action.*;
import org.apache.struts.upload.*;

public class UploadAction extends Action
{
  public ActionForward execute(ActionMapping mapping,
                               ActionForm form,
                               HttpServletRequest request,
                               HttpServletResponse response)
      throws Exception {
    if (form instanceof UploadForm) {
      Date date = new Date();
      System.out.println("-------------File Upload Begins-------------------") ;
      UploadForm theForm = (UploadForm) form;
      file://通过struts的FormFile类来获得上传的文件,前台jsp页面对应的代码
     

本文地址:http://com.8s8s.com/it/it1975.htm