This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
can i use the jstl sql tag instead of this and is there any disadvantage in this tag.
Yes, you can, but I would strongly recommend you not to. JSP's role is not to shake hands with a database. You'd better go through a dedicated component (servlet, JSF backing bean...) to retrieve the data.
when does the connection close if i use this jstl sql tag
You should have already been discouraged from using these tags But you can still check the JSTL specification, 10.3 <sql:query> and 10.5 <sql:transaction>.