What do you mean by "call a JSP page directly"? JSPs are not "called" in the
traditional sense; they are either invoked directly by the server, or as a
result of a forward or redirect from another JSP or a servlet. Beans are
helper Java classes, used by JSPs; beans don't become a part of a JSP
anymore than any class used by any Java code "becomes" a part of that piece
of code; a bean could never "become the main code body" of a JSP in any way.
The two models that you refer to have to do with the overall structure of a
system; whether there is a controlling servlet that acts as the "traffic
cop" for a set of JSPs, or whether the JSPs are invoked through direct URLs.
Neither model really dictates what you do in or how you write the bean that
handles your JDBC. Rather than ask which model is more widely used, you
should answer the question of which model better suits the needs of your
particular project. To answer that requires that you become familiar with
the differences between the models.
--Jim Preston
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of keith kwiatek
Sent: Thursday, June 29, 2000 1:59 PM
To: [EMAIL PROTECTED]
Subject: Direct JSP invokation, with JDBC bean ???
Hello,
Ok, I am sold on JSP's seperation of code/html, But I also understand that
there are a few different JSP "MODELS".... Which is the most widely used for
general JDBC access?
Can I call a JSP page directly, that references a JDBC bean? Does the "bean"
therefore become the main code body (equivalent for a cgi program)? If so,
how are the session and the http input parameters handled in the bean? Any
examples?
Keith
===========================================================================
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