aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes bean use Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "bean use" Watch "bean use" New topic
Author

bean use

Kalpesh Soni
Ranch Hand

Joined: Jan 02, 2001
Posts: 312
How does the JSP engine instantiate the bean ?
Is it mandatory to have no args constructor ?
what exactly is scope ?
Joel Carklin
Greenhorn

Joined: Jun 15, 2001
Posts: 28
Hi,
The Javabean API requires a class to have a no args constructor. This is so the system is able to instantiate the bean using the instantiate() method found in the java.beans.Beans package. I assume the jsp engine uses the same method to instantiate the bean though I'm not positive.
But Yes, it is mandatory to have no args constructor
scope, as I understand it, refers to an object which holds attrubutes. Each attribute has a unique identifying name linked to an object. A javabean would be such an attribute. There are 4 kinds of scope, indicating how much access there is to the bean. for example, a bean with page scope is only visible and accessable by the jsp page which contains it. a bean with request scope is visible to the page which contains it as well as any jsp or servlet the page is forwarded to. Session scope indicaties a bean is visible to all jsps and servlets which are part of the same session and application scope means the bean is available to all jsps and servlets in the entire web application...
I think
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: bean use