Hi,
    I have no problem with this. The point that I was trying to make (poorly ;-)
was that the setting up of the connection takes a noticeable amount of time. It is
therefore advantageous to have that connections already set up in advance of a
request, e.g. connection pool (handled by a bean of some sort or an already loaded
servlet).
If the bean is intantiated in the JSP then it will take a noticeable amount of
time to create the connections to the database, if this bean has a scope greater
than the page e.g. session or application it can of course be reused saving time
in the request. But, the JSP will have to have been called in advance.
So if you are going to the trouble of having a web server which also acts (to the
end user) as a database request server then it makes sense to have the database
request server (i.e. the connection to the database) set up in advance of a user
calling it. This can be achieved in many ways, one is the J2EE model, another is
to have a pre loaded servlet set up the connection pool. And I'm sure there are
many other permutations.

Karl

fgs infotech wrote:

>     In both ways when we make a JDBC  Connection from the servlet or from
> EJB, it  is going to take the same time only . But may be it  is  secure. We
> can still make the database connection from a Bean and instantiate the bean
> in the JSP Page. Any problem about this ,Karl Roberts.
>
> ----- Original Message -----
> From: Karl Roberts <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, November 15, 1999 4:08 PM
> Subject: Re: JDBC from JSP
>
> > Hi Sudha,
> >     In my humble opinion Connecting to a Database from a JSP is not such a
> good
> > idea due to the time taken to connect. However there are many other ways
> like
> > passing the request ,etc. to a servlet or to an Enterprise Java Bean to
> handle the
> > Database connectivity.
> >
> > The J2EE has a programming model that merges these methods and you can
> find it at
> >
> http://developer.javasoft.com/servlet/SessionServlet?url=http://developer.ja
> vasoft.com/developer/earlyAccess/j2sdkee/download-docs.html
> >
> > or go to
> > http://developer.java.sun.com/developer/products/j2ee/
> >
> > hope this helps
> >
> > Karl
> >
> > Sudha Gopalakrishnan wrote:
> >
> > > Hi,
> > >
> > > Can someone point me to an example where you do
> > > database connecctivity from a JSP page. ( Like you use
> > > ADOs in ASPs, what is the equivalent in JSPs?)
> > >
> > > Thanks,
> > > sudha
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Bid and sell for free at http://auctions.yahoo.com
> > >
> > >
> ===========================================================================
> > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > > FAQs on JSP can be found at:
> > >  http://java.sun.com/products/jsp/faq.html
> > >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >
> >
> ===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > FAQs on JSP can be found at:
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to