out of the three methods I am sure the second would be just fine, as far as
my preference is concerned and if security is an issue I would call a
servlet which in turn will call an EJB to get database result ( this method
is given in BEA Weblogic server manual)
Sandarbh
>From: Panos Konstantinidis <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
> reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Date: Thu, 28 Dec 2000 03:51:28 -0800
>
> I am a lazy guy so I would go for the first, but it is better to separate
>logic from content (and as many believe it is not always a good idea to
>have
>loads of java code inside a jsp page) so I guess the second solution would
>suit you more.
> I would not go for the third one because it is slower than the second
>one.
>
> Hope this helps.
>
>
>>From: Hariharan N <[EMAIL PROTECTED]>
>>Reply-To: A mailing list about Java Server Pages specification and
>> reference <[EMAIL PROTECTED]>
>>To: [EMAIL PROTECTED]
>>Date: Thu, 28 Dec 2000 03:44:54 -0800
>>
>>Hi!
>> I want to display a set of employee details from database in a JSP
>>Page.
>>Which method is best suited and "WHY"?
>>1. Establish directly connection from JSP and display records...
>>
>>
>>2. Divide into
>> Emp.jsp
>> Database Bean
>> form jsp create database bean which would fetch records form database.
>>Return directly the resultset to the JSP and display the records
>>
>>3.Divide into
>> Emp.jsp
>> Database Bean
>> Employee object
>> form jsp create database bean which would fetch records form database.
>>from the no of records fetched create as many employee objects and fill
>>the
>>details and send them as a vector to jsp which it would be type casted to
>>employee object not bean and then values are displayed from getmethods!!!
>>
>>Please explain why and which method is good... WHY..
>>Thanks!
>>
>>===========================================================================
>>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>>JSP-INTEREST".
>>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>>DIGEST".
>>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
>
>_________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>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
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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