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 convert String to Date in EL?
Date Tue, 20 Aug 2019 07:15:03 GMT
 This also works using Java description as following.

<c:set var="date" value="2019/8/20" scope="session"/>
<% SimpleDateFormat sdFormat = new SimpleDateFormat("yyyy/MM/dd");
   Date date = sdFormat.parse(session.getAttribute("date").toString());
   session.setAttribute("date_o", date); %>
<sql:setDataSource dataSource="jdbc/kome" var="kome"/>
<sql:update var="stmt" dataSource="${kome}">
 insert into test values(?,?)
 <sql:dateParam value="${date_o}" type="date"/>
 <sql:param value="Good"/>
</sql:update>

 We need such complicated way to Web-DB access?
We need simple way using EL description.

 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