Hi the easyest way is to put your connection in session.
Not good for big site.
The alternative is to use connection pooling.

----- Original Message -----
From: mayank singhal <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 26, 2000 8:23 PM
Subject: an interesting attempt!...


> Hi,
>         I would like to explain what I am trying to achieve.
> a) I have an Html file which takes the username and password from the
> user.
> b) In the Submit button of this file I am calling a user.jsp file.
> This jsp file calls a bean named userauth.java which checks for user
> authentication against the oracle
> database.
> I am creating a connection object in this bean and it has a scope as
> session.
> c)If the connection is successful I am calling an employee.html file for
> entering the employee details.
> d)The submit button of this html calls a file named insert.jsp.
> This file is responsible for getting the table name,column names(in an
> array), and column values(in an array) from the employee
> form.
> The table name is got in the form of an hidden field in the form.
> e)This insert.jsp calls a bean named insert.java  in which I am using
> the prepared statement to insert data in the database.
> I intend to write a generalized bean to insert data in the database.
> I want to use the same connection that was opened for user
> authentication in the insert bean.
>
> Pl. Can somebody guide me how to use the connection object created in
> one bean in another bean.
> I would also like you to comment on the above idea and let me know if
> there is a better way of achieving
> the above functionality.
>
> A bit urgent please.
>
> Regards,
>
> Tushar
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to