Hi Tim/Stani,

I'd go so far as to say SQL doesn't even belong in the model layer as per Fowler/Larmen/whomever 3-layer approaches.

My recommendation is to use some form of Controller servlet that takes care of much of what is needed, like setting up connections and setting attributes (not directly, see Fowler's P of EAA or my thesis --if you're a masochist-- https://soenea.htmlweb.com/trac/browser/Documentation/trunk/Thesis/Thesis_Stuart.pdf). This allows problems like that to be addressed in the appropriate places, leaving the JSP Templates oblivious to it all and letting the jstl stuff stick to providing appropriate support to display relevant data in the JSPs. Even if your abstraction was less religiously (Domain) Object-Oriented than what I propose, having your jstl stuff just manipulate some form of ResultSet/DAO would probably achieve appropriate separation, with problems like missing database drivers happening before the JSP is even dispatched to (and possibly leading to the dispatching to an error view).


On 10/27/2011 11:21 AM, Stani Ryabenkiy wrote:
Hi Tim,

1) using SQL tags in a JSP is a bad design choice, I recommend against it.
SQL belongs in the model layer, not the presentation layer.
2) I am not familiar with how NetBeans does things nor have I tried Derby
but to me this sounds like a typical Tomcat class loader problem. The SQL
tags (or whatever is looking for the Derby driver) are outside your
application (loaded by Tomcat's common class loader) so they cannot see the
Derby classes loaded inside your application. Try locating the Tomcat
installation that NetBeans is starting and add the Derby driver jar to the
lib folder in there, that will most likely fix it.

Good Luck,

On Thu, Oct 27, 2011 at 11:14 AM, Tim Puchala<tim.puch...@hotmail.com>wrote:

I’m trying to run explore SQL Tags section of the sample project provided
by NetBeans called JSTLExamples
I changed the database url to use sample rather than the default
jstl-sample because that is the databes in the Services pane under
Databases. The schema is APP and the user is app.
I used app and app for user and password.
I am getting an SQLException when executing the QueryIterate option (first
on the page).
The description of the exception is “No suitable driver found for
I have tried adding the jar file derbyclient.jar to the project library,
but this doesn’t correct the error.
I would have thought the project shouldn’t need tweaking like this anyway
if it’s a sample project provided by Netbeans.
Any ideas, anybody?

To unsubscribe, e-mail: taglibs-user-unsubscr...@tomcat.apache.org
For additional commands, e-mail: taglibs-user-h...@tomcat.apache.org

Reply via email to