tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Thiel <stuart.th...@gmail.com>
Subject Re: How to cast String to int in EL?
Date Tue, 20 Aug 2019 08:35:38 GMT
Just be careful. If there is no paean passed, I expect it silently
evaluates to 0.

On Tue, Aug 20, 2019, 05:09 Kazuaki Miyauchi <miyauchk@gmail.com> wrote:

>  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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message