WEB开发网
开发学院数据库Oracle Oracle中三种上载文件技术 阅读

Oracle中三种上载文件技术

 2006-08-06 12:01:01 来源:WEB开发网   
核心提示: up_file.jsp的源程序:<%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/sqltaglib.tld" prefix="database" %><%@ taglib uri=&

up_file.jsp的源程序:

<%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/sqltaglib.tld" prefix="database" %>
<%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/fileaccess.tld" prefix="fileaccess" %>
<%@ page language="java" contentType="text/html; charset=gb2312"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/HTML;charset=gb2312">
<title>jdbc upload and download blob</title>
</head>
<body>
<database:dbOpen user="zy" password="zy"
URL="jdbc:oracle:thin:@db92:1521:cf92" commitOnClose="true">
<fileaccess:httpUpload
destination="zy_blob"
destinationType="database"
table="blob_table">
</fileaccess:httpUpload>
</database:dbOpen>
Done!
<a href="dn_file.jsp">下载!</a>
</body></html>

dn_file.jsp的源程序:

<%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/fileaccess.tld" prefix="fileaccess" %>
<%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/sqltaglib.tld" prefix="database" %>
<%@ page contentType="text/html;charset=GBK"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
</head>
<body>
<database:dbOpen user="zy" password="zy"
URL="jdbc:oracle:thin:@db92:1521:cf92">
<fileaccess:httpDownload source="*" servletPath="/"
sourceType="database" table="blob_table">
</fileaccess:httpDownload>
</database:dbOpen>
Download done!
</body>
</html>

上一页  1 2 3 4 5 6  下一页

Tags:Oracle 上载 文件

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接