tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Starting out <>
Subject How jsp assigns the variable type for <c:set />
Date Tue, 31 Aug 2004 08:21:19 GMT
i fetched an int type from mysql and assign to variable

<c:set var="eid" value="${rs.rows[0].eid}" scope="session" />

it seems that its assigning type int since if i

String test = (String) pageContext.getAttribute("eid");

i get a cast error

but if i 

<c:set var="eid" value="1" scope="session" />

the ff
String test = (String) pageContext.getAttribute("eid");

would work

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message