[opencms-dev] Open Cms and Tag lib

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


Thanks, but I 'am a newbie in jsp/java programming, so where can I found the
definition for the Object class ?

-----Message d'origine-----
De : Stephan Hartmann [mailto:hartmann at waehrisch-feykes.de]
Envoyé : jeudi 10 juillet 2003 10:55
À : opencms-dev at opencms.org
Objet : Re: [opencms-dev] Open Cms and Tag lib


hi,

try 

<%
Object o = pageContext.findAttribute("toto");
%>



Am Donnerstag, 10. Juli 2003 10:21 schrieben Sie:
> 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];
>
> %>
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev

-- 
Stephan Hartmann

Währisch & Feykes GmbH
Gustav-Adolf-Str. 5
47057 Duisburg
Tel. 0203 / 373 070
Fax 0203 / 376 766
hartmann at wfnetz.de

------------------------------------------------------
Ausschlusserklärung (Disclaimer):
Über das Internet versandte E-mails können unter fremden Namen erstellt oder

manipuliert werden. Aus diesem Grund enthalten unsere mit E-mail
verschickten 
Nachrichten grundsätzlich keine rechtsverbindlichen Willenserklärungen.
_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20030710/a7e405c3/attachment.htm>


More information about the opencms-dev mailing list