11. Learning Java: JSTL, part 2 – a rant

In the 11th hours, I continued with JSTL. In this, I learned about delimits, Connections to the database. Here is another blah blah post continued. You can continue reading my blah blah post for many days to come. 🙂

Here are the hand written fragments.


<core:set value="Satya|Prakash:Karan" var="Names" />

<core:forTokens items="${names}" var="name" delims=":|" />

<core:out value="${names}" /> <br/>


Datebase Connection:

Add library: jstl/sql-rt. Prefix given : sql

<sql:setDataSource Driver="com.mysql.jdbc.Driver" var="conn" Database="jdbc:mysql://" />

<sql:query DataSource="${conn}" query="select * from tableName where eno=1" var="table" />





<core:forEach items="${table.columnNames}"  var="columns" >

<td> <core:out value="${columns}" /></td>



<core:forEach items="${table.rows}" var="Row">
<td> <core:out value ="${Row.Eno}"/> </td>
<td> <core:out value ="${Row.Ename}"/> </td>
<td> <core:out value ="${Row.Salary}"/> </td>
<td> <core:out value ="${Row.Email}"/> </td>
<td> <core:out value ="${Row.Address}"/> </td>