<%@ page language="java" errorPage="error.jsp"  contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/fileaccess.tld" prefix="download" %>
<%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/sqltaglib.tld" prefix="sql" %>
<% String connStr=request.getParameter("DSconnStr");
   if (connStr==null) { connStr=(String)session.getValue("DSconnStr");}
   else { session.putValue("DSconnStr",connStr);}
   if (connStr==null) { %>
<jsp:forward page="setconn.jsp" />
<% } %>
<html> <body>
<% 
   String s = request.getRequestURI();
   String servletPath = s.substring(0,s.indexOf("jsp/fileaccess")) + "servlet/download/";
%>
<sql:dbOpen dataSource="<%= connStr %>" >
  <download:httpDownload
     sourceType = "database" 
     source="*"
     servletPath = '<%= servletPath %>' >
     <br>:
  </download:httpDownload>
</sql:dbOpen>
<br>Done!
</body> </html>
