tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Starting out <starting...@gmail.com>
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message