tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lyndon Durham <net.real...@verizon.net>
Subject Re: Use Java Bean component
Date Thu, 15 May 2003 10:50:13 GMT
Have you tried sessionScope.Customer.name ?

p@zdzior wrote:

>Hi everybody,
>
>I am using using java bean Component Customer:
>
><jsp:useBean id="Customer" class="com.test.CustomerBean" scope="session"/>
>
>which contails some filed like name, surname, ... and standard setter and getter methods.
>
>I try to do select on database to retreive all data about the current customer:
>
><sql:query var="cust_data" dataSource="${test}" scope="session">
>    SELECT CUST_USERNAME, CUST_PHONENO, CUST_NAME, CUST_SURNAME, CUST_STREET, CUST_ZIPCODE,
CUST_TOWN,
>           CUST_EMAIL, CUST_SEX, CUST_AGE FROM CUSTOMER
>           WHERE CUST_USERNAME = ?
>  <sql:param><%= request.getRemoteUser()%></sql:param>
></sql:query>
>
>then I would like to set all bean fileds to the retreived values,
>I have tried to do:
>
><c:set var="Customer.name" value = "${cust_data.rows[0].CUST_NAME}" scope="session"/>
>
>unfortunately it does not work, if i try later obtain this value by:
>
><c:out value="$Customer.name"/> I receive an empty string.
>
>If I use <c:out value="${cust_data.rows[0].CUST_NAME}"/> then it works ok?
>
>I would be gratefull for any help.
>
>regards,
>Lukasz
>
>
>  
>


Mime
View raw message