Hi,
    When you add <jsp:useBean id = "something" scope = "session" class="someclass"
/> in your first page, this will do :
- crearte an instance of type someclass named something and put that instance in
the session object using session.putValue(..) or session.setAttribute(..)
    Then in other pages of the same application, if you want to use an instance, it
is the same as in a class, you have to specifiy how to get that instance . In jsp
ypou have to include <jsp:useBean id = "something" scope = "session"
class="someclass" /> the engine will fist look for a someclass object named
something in the session object and use it if found else create it. If you want you
could also get the object directly using session;getValue(something) ot
getAttribute(something)

    Hope this answer your question
Regards
Veronique



Rahul Naithani a �crit :

> Hi,
> Is it necessary to physically include the statement
> <jsp:useBean id = "something" scope = "session" class="someclass" />
> on top of each jsp page if the page has to use the bean "something"?
>
> If in the first page of the application I have already included the above
> statement then as what scope should I use this bean again.
> This question emerges because if the first page already has the session
> scope of a bean declared, how to use the bean in other pages following the
> first page?
>
> Thanks in advance,
> Rahul.
>
> ===========================================================================
> 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

Reply via email to