• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java bean..

 
eswar kumar
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the exact purpose of java bean in JSP?
 
Soman Singh
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess its the resuability of the code ie the bean. You can use it again and again without changing the class every time .. just adding the getter and setter solves the purpose ..
Its easy to use also.
 
Malhar Barai
Author
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...
You would come across MVC framework in many books.
This framework specifies :
Bean - Model
JSP/Swing - View
Servlet - Controller
Bean contains all the business logic.
JSP/Swing is the view that the users see. The user is least concerned with what is going on in the background. Even at the design time, the designers should not be bother about the business logic that has to be implemented. So this pattern was developed, where Bean is the model. So you can use JSP or any other view & call the methods from the bean & show the results. So its not exactly JSP/Beans, it can be Swing/Beans too & the Bean that is implemented with JSP could be the same with Swing too.
Hope you get the point.
hth
MB
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic