Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_jsp thread: Newbie - Problems Accessing another class from a JavaBean


Message #1 by "Rudi Doku" <rudidoku@h...> on Wed, 21 Nov 2001 00:43:32
Hello there,

I have 2 classes, DbConnection.java and artistBean.java. DbConnection is a 
singleton that maintains a connection to a local DB. Both classes belong 
to the same package com.doku.rudi.

I have a method getUserKey(String userCode, String password) in 
asrtistBean.java which first tries to get a connection :-

DbConnection con = DbConnection.getInstance();    

As both classes belong to the same package there is no need for me to 
import DbConnection.java

Problem:

The following error is displayed when i try to compile artistBean.java - 
Class DbConnection not found in type declaration or import. Undefined 
variable, class, or package name: DbConnection.

I'm using forte. 

Any hints would be very much appreciated.

Cheers,

Rudi

  Return to Index