You're treading on thin ice here, buddy, some of these guys are ruthless. Someone already told you how. You don't use 'Class instance = Class()'
You add this same tag to all the JSP's in which you want to use the bean: <jsp:useBean id="myBean" class="com.myclass.MyBean" scope="session" /> Once a JSP instantiates the bean, all other JSP's can use it's getter and setter methods and the return value/object will persist across the user session. This is basic stuff. Read a tutorial or a book. Greg -----Original Message----- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Martin Simon Sent: Tuesday, September 24, 2002 9:57 AM To: [EMAIL PROTECTED] Subject: Re: share objects Please an example of two JSPs, where in first is "Class instance = class ()" and in second i will use methods from "Class" without creating an instance. THANX a LOT!!!! ----- Original Message ----- From: Zerbe John W <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, September 24, 2002 4:18 PM Subject: Re: share objects > Read it again. Those beans can be simple classes (ex: String) populated via > request parms in "request" scope, or your own complex classes. Again, read > about "scope". You can use these tags to create a "bean" instance and share > it between servlets and/or jsps. > http://java.sun.com/products/jsp/download.html#specs > > -----Original Message----- > From: Martin Simon [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 24, 2002 10:13 AM > To: [EMAIL PROTECTED] > Subject: Re: share objects > > > i read about it, but with beans i CANNOT give OBJECTS between JSP. I can > only give VARIABLES. > > ----- Original Message ----- > From: Steven A. Martin <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, September 24, 2002 3:53 PM > Subject: Re: share objects > > > > Again, read about the jsp:useBean tag and scope. Learn to fish instead of > > being given the fish. > > > > > > ----- Original Message ----- > > From: "Martin Simon" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Tuesday, September 24, 2002 9:52 AM > > Subject: share objects > > > > > > > How can i share objects between JSP? > > > > > > > > > =========================================================================== > > > 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://archives.java.sun.com/jsp-interest.html > > > http://java.sun.com/products/jsp/faq.html > > > http://www.esperanto.org.nz/jsp/jspfaq.jsp > > > http://www.jguru.com/faq/index.jsp > > > http://www.jspinsider.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://archives.java.sun.com/jsp-interest.html > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.jsp > > http://www.jguru.com/faq/index.jsp > > http://www.jspinsider.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://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > ***************************************************************** > DISCLAIMER: The information contained in this e-mail may be confidential > and is intended solely for the use of the named addressee. Access, copying > or re-use of the e-mail or any information contained therein by any other > person is not authorized. If you are not the intended recipient please > notify us immediately by returning the e-mail to the originator. > > =========================================================================== > 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://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.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://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.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://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com