bhupesh vora wrote:
>
> I have a data base Bean DdBean.class
> I have created a instance of that bean db with scope as application in one
> of the jsp pasge   ( <jsp:useBean id="db" scope="application"
> class="sunexamples.beans.myjspbeans.DbBean" />
>
> now that as I have given scope as application the id should be visible in
> another jsp page ....pls rectify if I am wrong
>
> Do I have to Create another instance of DdBean or can I use the same
> Instance of the bean in other Jsp pages

When you specify application scope for a bean, it's only created the first
time someone accesses the page with the <jsp:useBean> action element. But
you still need to include the <jsp:useBean> action in all pages where you
like to use the bean, since <jsp:useBean> is used to associate the bean
with a name that you use in other action elements and scripting code. If
the bean already exists, the <jsp:useBean> action doesn't create a new bean.

Hans
--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com

===========================================================================
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