tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kazuaki Miyauchi <miyau...@gmail.com>
Subject Re: How to cast String to int in EL?
Date Tue, 20 Aug 2019 08:09:43 GMT
 Thank you, Stuart! This is what I want to know.

2019-08-20 16:48 GMT+09:00, Stuart Thiel <stuart.thiel@gmail.com>:
> Ah, it is parameter casting you're after. That was unclear from your
> initial request. What does:
> <sql:param value="${0 + param.member_id}"/>
> yield?

 Following correctly works!!

<c:set var="member_id" value="1" scope="session"/>
<sql:setDataSource dataSource="jdbc/kome" var="kome"/>
<sql:update var="stmt" dataSource="${kome}">
 insert into test values(?,?)
 <sql:param value="${0 + member_id}"/>
 <sql:param value="Miyauchi"/>
</sql:update>

 Regards,                     Kazuaki Miyauchi, Japan

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@tomcat.apache.org
For additional commands, e-mail: taglibs-user-help@tomcat.apache.org


Mime
View raw message