Its better to use the use bean tag:
<jsp: useBean id=" beanInstanceName " scope=" page |request| session|
application"
{ class=" package. class " [ type=" package. class " ] | type=" package.
class "|
beanName="{ package. class | <%= expression %>}" type=" package. class "}
{/>|> other elements </ jsp: useBean> }
This is efficient because it have various functionality that can be availed
while initialisation ..So it's a better option rather than instatiating the
bean and access its methods.
Hope this might help
regards
Prasanjeet
----- Original Message -----
From: "Narayanaswamy, Kumaran (CTS)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 04, 2000 2:23 PM
Subject: Which is the Best Method to do??
> Hi All
> I need some Clarification regarding which method is efficient?
> I have a Javabean.I need to use it in JSP .
> Can i go for usebean TaG OR instatiating the bean and access its methods
> inside <% %> tag.Please also note that if the Java bean need to be
Converted
> to Enterprise Java Bean there should be only minimum Code Change.
>
> with regards,
> Kumaran
>
> This e-mail and any files transmitted with it are for the sole use
> of the intended recipient(s) and may contain confidential and privileged
information.
> If you are not the intended recipient, please contact the sender by reply
e-mail and
> destroy all copies of the original message. Any unauthorised review, use,
disclosure,
> dissemination, forwarding, printing or copying of this email or any action
taken in
> reliance on this e-mail is strictly prohibited and may be unlawful.
>
> Visit us at http://www.cognizant.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
===========================================================================
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