Hi yall. I've been having a frustrating problem. I'm
not sure if it is a JSP, servlet, or java issue, but
I'll ask it here:

I am trying to use JSP and Java Beans to access a
database with JDBC.
I have created a class HWApplication which is a
singleton=patter class with a getInstance() method that
returns the one-and-only instance.
The constructor of HWApplication get the singleton
instance of the ConnectionPool class and stores it in
an instance variable.

Finally, HWApplication has a method which returns a
Vector of EmployeeBean objects, fetched from the
database.

Now, the class works fine, when instantiated from a
command-line java app (with a main() method), It
displays the data, and everything is great.

But from JSP, it doesn't work. My JSP has a <USEBEAN>
tag as follows:

<USEBEAN name=employeePage type=testPage.EmployeePage
lifespan=page>

The EmployeePage class is a subclass of HWPage, which
has an application() method that returns
HWApplication.getinstance(), and EmployeePage has an
artistBeans method that returns
application().getEmployeeBeans().elementAt(index).

I've gotten the JSP to work when the JDBC connection
code is contained in the EmployeePage class. But when I
try to move the logic to other classes, it doesn't work
(the HTML inside my <LOOP> tag never gets printed to
the browser.)

Naturally, any help would be greatly appreciated. I am
using JRun2.3, jdk1.2 and windows NT.

thanks,
Harris
(talking about code is such a tongue-twister...)
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to