• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Difference between jsp:useBean and ....

 
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Nelson Nadal
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Bear! I appreciate your answer also to the other one.
reply
    Bookmark Topic Watch Topic
  • New Topic