tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darren Lee Deliang" <>
Subject RE: Help me !
Date Wed, 12 Jul 2000 11:17:02 GMT

I did declare the con as :

private Connection con = null;

but it posed no problems in my other jsp pages..

Another qn, is it possible to establish only one Connection object to my db 
(con) and use it for different methods in my class? for example method A 
wants to access and read some data from Table A in my db while method B will 
access and WRITE to Table B in my db. Can I use the same con or do I need to 
declare several?


>From: Bob Byron <>
>To: "Darren Lee Deliang" <>,    tomcat-user 
>Subject: RE: Help me !
>Date: Tue, 11 Jul 2000 12:03:28 -0400
>I would suspect your variable "con" is null.  If you want a quick check, I
>would insert System.out.println("Connection=" + con); before line 253.
>If it displays "Connection=null", you will want to reexamine the
>initialization of con.
>Bob Byron
>RAD Systems, Inc.

Get Your Private, Free E-mail from MSN Hotmail at

View raw message