[opencms-dev] Open Cms and Tag lib

Sebastien Dagnicourt sdagnicourt at oxauto.com
Thu Jul 10 10:47:01 CEST 2003


Hello,

I do some sql stuff with this :
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>

<c:set var="myDbUrl" value="jdbc:mysql://localhost:3306/opencms"
scope="session"/>
<c:set var="myDbDriver" value="org.gjt.mm.mysql.Driver" scope="session"/>
<c:set var="myDbUserName" value="bidule" scope="session"/>
<c:set var="myDbPassword" value="truc" scope="session"/>

<sql:setDataSource
  var="example"
  driver="${sessionScope.myDbDriver}"
  url="${sessionScope.myDbUrl}"
  user="${sessionScope.myDbUserName}"
  password="${sessionScope.myDbPassword}"
/>
<sql:transaction dataSource="${example}">

  <sql:query var="toto">
    select count(RESOURCE_NAME)/2 from CMS_ONLINE_RESOURCES where
RESOURCE_NAME like '%RetExp/fiches%html'  
  </sql:query>
</sql:transaction>

<c:out value="${toto.rows[0]}" />

My question is : How can I get the "toto" value in the last part of the
script, which is like that :

<% 
  com.opencms.flex.jsp.CmsJspActionElement cms = new
CmsJspActionElement(pageContext, request, response);
  com.opencms.file.CmsObject  cmsobj = cms.getCmsObject();
  com.opencms.flex.jsp.CmsJspNavBuilder cmsnav = new
CmsJspNavBuilder(cmsobj);


String param = request.getParameter("qfam");
ArrayList qfamlist ;
String[] finale = null ;

finale = new String[value of toto];

%>



More information about the opencms-dev mailing list