cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ling Kok Choon <kokch...@brel.com>
Subject Re: sql query
Date Thu, 03 Jan 2002 02:22:33 GMT
Hi,

  you may try to use xsp and the esql taglib :

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsp:page
          language="java"
          xmlns:xsp="http://apache.org/xsp"
	  xmlns:esql="http://apache.org/cocoon/SQL/v2"
>
<esql:connection>
    <esql:pool>tpConnection</esql:pool>
     <esql:execute-query>
      <esql:query>SELECT GROUP_ID, LABEL, PATH FROM GROUP_EXT</esql:query>  
    
      <esql:results>
        <esql:row-results>      
          <xsp:logic>                   
                   
                   int group_id = <esql:get-int column="GROUP_ID"/>;               
             
        
  		   String label = <esql:get-string column="LABEL"/>;  		     		 
  
  	           String group_path = <esql:get-string column="PATH"/>;
  	           
 	           String result = getSelectedIndex ( group_path );
		   if ( uri.equals(result.concat(".xml")) )
		   {
			//System.out.println("path:" + path );
			requestedIndex = group_id;
		   }                   
          </xsp:logic>
        
        </esql:row-results>      
      </esql:results>

      <esql:no-results>
        <xsp:logic>System.out.println("First: No result");</xsp:logic>
      </esql:no-results>    
    </esql:execute-query>
</esql:connection>

</xsp:page>


for more information, please visit : http://xml.apache.org/cocoon/userdocs/xsp/esql.html

hth,

regards,
Kok Choon.


--------------------------------------------------------
Name: Ling Kok Choon
E-mail: Ling Kok Choon <kokchoon@brel.com>
Date: 01/03/02
Time: 10:22:32

This message was sent by Z-Mail Pro - from NetManage
NetManage - delivers Standards Based IntraNet Solutions
--------------------------------------------------------

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message