RE: RE: Error in servlet

From: Andreas Tille <tillea(at)rki(dot)de>
To: chris markiewicz <cmarkiew(at)commnav(dot)com>
Cc: "'PostgreSQL General'" <pgsql-general(at)postgresql(dot)org>
Subject: RE: RE: Error in servlet
Date: 2000-09-15 11:36:05
Message-ID: Pine.LNX.4.21.0009151331500.6463-100000@wr-linux02.rki.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 15 Sep 2000, chris markiewicz wrote:

> oh yeah, and you need to call rs.next()...
;-)))

> there are two obvious solutions to this problem...
>
> 1 (i DON'T recommend this one) declare the variables in a method and pass
> them to other methods as necessary.
>
> 2 (i do recommend this one) many server side java programmers feel that
> servlets should be a gateway and nothing else...essentially a servlet should
> do little more than call your other classes. i.e. put all of your db
> processing in a separate class and call it from your servlet.
In this case I'm perfectly all right. My servlet has just about 20 lines
and does call a class. This class instanciates a "Database-Accessing"-
Class (WebSQL) because I started with access to MS SQL server and now porting
to PostgreSQL. I just have to change WebSQL to use another database
engine. All the connections, statements etc are private in this
class. But I wanted to avoid to declare this stuff in every method
of this class.

Kind regards

Andreas.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message chris markiewicz 2000-09-15 13:49:13 what is the equivalent of oracle's DESCRIBE table?
Previous Message chris markiewicz 2000-09-15 11:21:39 RE: RE: Error in servlet