<%
   String connStr=request.getParameter("connStr");
   if (connStr==null) {
     connStr=(String)session.getValue("connStr");
   } else {
     session.putValue("connStr",connStr);
   }
   if (connStr==null) { %>
<jsp:forward page="../setconn.jsp" />
<%
   }
%>
<%@ taglib uri="/WEB-INF/sqltaglib.tld" prefix="jml" %>
   <HTML> 
       <HEAD> 
           <TITLE>Result Set Iteration Sample </TITLE> 
       </HEAD>
       <BODY BGCOLOR="#FFFFFF"> 
            <HR>
            <jml:dbOpen connId="con1" URL="<%= connStr %>"  
             user="scott" password="tiger" />
            <jml:dbQuery connId="con1" output="jdbc" queryId="myquery">
               select ENAME from EMP
            </jml:dbQuery>
            <jml:dbNextRow queryId="myquery">
                <%= myquery.getString(1) %> <br>
            </jml:dbNextRow>
            <jml:dbCloseQuery queryId="myquery" />
            <jml:dbClose connId="con1" />
            <HR> 
       </BODY> 
  </HTML> 

