I'm not trying to access a bean in jsp, i'm trying to access a bean from
another bean directly, without jsp as an intermediate.
I don't want to pass that connection allong to all the classes (quite a
tree), because not all the classes have to use the connection, just the once
at the bottom of the tree.



----- Original Message -----
From: "Kris Gonzalez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 27, 2001 10:31 AM
Subject: Re: bean accessing bean


> Sam...
>
> I do the same thing, and accomplish this in JSP by importing the bean
> class via:
>
> <%@ page import="ConnectionBean" %>
>
> and instantiate the bean with
>
> <jsp:useBean id="conn" class="ConnectionBean" scope="request" />
>
> and using it via
>
> <%    conn.getConnection();   %>
>
> or some like sequence...
>
> Sam wrote:
>
> > Hi, I'm using Tomcat and have several Beans, who all require a
> > database connection.I've defined a connectionBean (which ofcourse
> > handles the database connection via connectionPooling). I want to be
> > able to call this connectionBean in every other bean.Can someone tell
> > me how to do that? Sam.
>

Reply via email to