Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JSP and the fly likes Difference between jsp:useBean and .... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Difference between jsp:useBean and ...." Watch "Difference between jsp:useBean and ...." New topic
Author

Difference between jsp:useBean and ....

Nelson Nadal
Ranch Hand

Joined: Jun 06, 2002
Posts: 169
Theoretically speaking, is there any difference as far as object resources is concern, when you extend or import a class(bean) and using that class(bean) as bean by <jsp:useBean ..../>
The only thing differ is the syntax of course but for using it as the objects resources is the same.
Am I making sense? Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60769
    
  65

No, they are not the same. When you import a class or package you are merely making it available to the compiler to use when resolving references to it. When you use jsp:useban, you are causing an instance of the bean class to become instantiated and placed in the scope that you specify -- unless a bean of that id and class laready exists in the scope, in which case the id is just "hooked up" to the existing instance.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Nelson Nadal
Ranch Hand

Joined: Jun 06, 2002
Posts: 169
Thanks Bear! I appreciate your answer also to the other one.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between jsp:useBean and ....
 
Similar Threads
Diff between jsp:useBean and java class inJSP
using jsp:useBean
difference between Class attribute and beanName attribute of jsp:useBean
jsp:useBean tag
give another jsp to action