I am facing problem in accessing the jsp "core tag" in jsp "sql tag" for a query.
Code :
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
<sql:setDataSource
var="myDS"
driver="org.postgresql.Driver"
url="jdbc:postgresql://localhost:xxxx/xyz"
user="xyz" password="test123"
/>
<% String user_Email = session.getAttribute("email").toString();
out.println("Email = "+ user_Email); %>
<c:set var="emailid" value= "${user_Email}"/>
<sql:query var="listUsers" dataSource="${myDS}">
SELECT * FROM developer_apikey_registration where email_id = ? ;
<sql:param value="${emailid}"/>
</sql:query>
I am not able to get the email value here. Although I checked that it is coming correctly in the session attribute.
Please help me in this regard. I am new to JSP Thanks in Advance.