This post originated from an RSS feed registered with Java Buzz
by Andrej Koelewijn.
Original Post: JSP 2.0 sql tag to call stored procedures
Feed Title: Andrej Koelewijn
Feed URL: http://feeds.feedburner.com/AndrejKoelewijn
Feed Description: On Oracle, Java and OpenSource
As i mentioned some time ago, i've created a small jsp application using jstl. I found that the sql tags part of jstl really enable you to quickly create small web applications. Ofcource this architecture isn't really fit for large websites, but for small internal apps, and for prototyping it's ok.
One thing i missed was a tag to call a stored procedure, preferable in a separate thread as i needed to start some long running stored procedures. I couldn't find any taglibs which offered this.
But with jsp 2.0 it's really easy to implement new tags. You create a .tag file under WEB-INF/tags/. A tag file is basically a jsp fragment. I created the following file: WEB-INF/tags/sql/call.tag. So now i can use it as follows: