[opencms-dev] Open Cms and Tag lib

Stephan Hartmann hartmann at waehrisch-feykes.de
Wed Jul 16 08:06:01 CEST 2003


You have to know what type of "toto" is if you want to use it in scriptlet 
code and cast to this type. Maybe it is a ResultSet but i'm not sure.
If you want to get the elements of toto with jsp tags have a look at
http://www.manning.com/bayern/appendixA.pdf

bye,
Stephan

Am Dienstag, 15. Juli 2003 17:01 schrieben Sie:

> > Ok, thanks, but now how can i get the value of "toto" attribute ?
>
> -----Message d'origine-----
> De : Stephan Hartmann [mailto:hartmann at waehrisch-feykes.de]
> Envoyé : Thursday, July 10, 2003 10:55 AM
> À : 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

----------------------------------------
Content-Type: text/html; charset="iso-8859-1"; name="Anhang: 1"
Content-Transfer-Encoding: quoted-printable
Content-Description: 
----------------------------------------

-- 
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.



More information about the opencms-dev mailing list