I am learning JSTL and find useful using c:sql tag. But if I use it in
JSP pages that have function declaration like below I get comiple error. Are we not allowed to use JSTL in
Java code. Reallyn when I look at java fiel in work directory it seems compile error.:
<%!
String convertResultsToSelect () throws SQLException
{
<sql:setDataSource var="example" scope="application"
driver="oracle.jdbc.driver.OracleDriver"
url="jdbc
racle:thin:@locathost:8080
rcl"
user="scott"
password="tiger"
/>
<sql:query dataSource="${example}" var="empList" scope="request">
SELECT * FROM test_object
</sql:query>
return "sb";
}
%>