Hi Rinaldo,
You shouldn't call "new ConnectionPool( )". The useBean directive
already instantiated an ConnectionPool object. Right now, your
pool.setDriver() call is setting the driver in the new object instead of
that one instantiated by "useBean".
Hope this helps.
Qiao
----- Original Message -----
From: "Rinaldo Bonazzo" <[EMAIL PROTECTED]>
Sent: Thursday, March 01, 2001 9:25 AM
Subject: ConnectionPool and JSP
> Hi,
> can somebody help me I use the following code
> ....
> <jsp:useBean id="pool" scope= "application" class="ConnectionPool"/>
> .....
> <%
> Connection conn=null;
> try{
> if ( pool.getDriver()== null ) {
> pool=new ConnectionPool();
> pool.setDriver(driver);
> pool.setURL(url);
> pool.setUsername(UserName);
> pool.setPassword(Pwd);
> pool.setSize(5);
> pool.initializePool();
> }
> conn = pool.getConnection();
> ....
> When I call this page all it's ok but when a call a second page the
pool.getDriver() return null
> why?
> thank's in advance
> Rinaldo
> [EMAIL PROTECTED]
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html