• 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

Why javaBeans

 
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JavaBeans contain getter and setter methods.
**I think work which we can do through getAttribute() and setAttribute() ,
are being done again through javabeans.
***Plz tell me if there is any other special significance of javabeans.
 
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
I do not understand your question. Beans and scoped variables that you set with getAttribute and setAttribute have little to do with each other except that beans are frequently used as scoped variables.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's more, there is mothing JSP-specific about JavaBeans. They can be (and are) used in all Java contexts. Their particular siginificance is that their fields and corresponding getter/setter methods follow certain naming conventions, which makes it easy to use reflection on them.
 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But as far as i understand javaBeans are just used to get and set values of object by
<jsp:getProperty> and <jsp:setProperty> respectively.
##I think there is no special significance of beans,plz tell me if there is any thing that can be done only through javabeans.
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Raj Kumar Bindal:
I think there is no special significance of beans,plz tell me if there is any thing that can be done only through javabeans.



POJO Works.

- http://www.onjava.com/pub/a/onjava/2005/06/29/spring-ejb3.html
- http://www.martinfowler.com/bliki/POJO.html
- http://www.manning-source.com/books/crichardson/crichardson_ch01.pdf
- http://www.manning-source.com/books/crichardson/crichardson_ch02.pdf
 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Raj Kumar Bindal:
JavaBeans contain getter and setter methods.
**I think work which we can do through getAttribute() and setAttribute() ,
are being done again through javabeans.
***Plz tell me if there is any other special significance of javabeans.



I guess,

If you will not use JB then YOU will have to set ALL the objects/properties in scope instead of setting them in JB and set this JB in any scope.

You will not be able to use standard actions (useBean, getProperty and setProperty) and EL.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic