tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy" <a...@fritter.net>
Subject Re: connecting to PostgreSQL
Date Mon, 30 May 2005 19:56:57 GMT

Hi Tom,

I may not be able to figure out c:choose (see my last post!) but I do know
that you probably don't want to be embedding SQL in JSP unless it's a quick
dirty hack.

I make my connection to PostgreSQL by implementing the DAO pattern to create
a data persistence layer -

http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.ht
ml

I like this because you can JUnit test the Model seperately from the View
and Controller parts, and the same code can be used with Servlets, Struts
Actions, Tags, Filters, etc.

You'll probably want to implement connection pooling though -

http://jakarta.apache.org/commons/dbcp/

I think this is OT for this list, if you need to shortcut the learning
curve, e-mail me directly and I'll send you some example code.

Andy.




---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message