Re: jdbc servlets and jsp

From: Luke Vanderfluit <luke(at)chipcity(dot)com(dot)au>
To: Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk>
Cc: "pgsql-jdbc (at) postgresql " "(dot) org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: jdbc servlets and jsp
Date: 2003-09-09 03:16:13
Message-ID: 1063077373.14971.21.camel@bench.chipcity.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi Paul,

thanks for your reply :-)
I'm a student trying to get java talking to a postgresql database.
My first step is to get the several components talking to each other.
So far I have got regular java classes talking to the database,
my question was about getting jsp and servlets talking to the database
using tomcat. That should be possible, though not desirable in a
production environment perhaps, as you pointed out.

Interesting to hear about your setup,

kind regards,
Luke

> I'm not sure why you would want to load the JDBC driver in your JSP. JSPs
> are part of the view layer. Your JDBC stuff should be way back in the
> persistence layer. Even servlets are really too far forward for this - use
> then more as controllers. Personally, I use JSP/Struts for the
> view/controller and obtain back-end connections using JNDI. The datasource
> name is provided as a servlet parameter in web.xml and is passed to the
> data layer on session creation. You might find it useful to look at the
> j2ee design patterns at java.sun.com.

--
====================================
"when my computer smiles, I'm happy"
===============================.~ ~,
Luke Vanderfluit |'/']
Mobile: 0421 276 282 \~/`

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Nick Fankhauser 2003-09-09 03:46:53 Re: jdbc servlets and jsp
Previous Message James Robinson 2003-09-09 00:57:04 Re: JBoss w/int8 primary keys in postgres ...