• Post Reply Bookmark Topic Watch Topic
  • New Topic

UseBean  RSS feed

 
Hyder Ali
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
what is the advantage of UseBean tag in JSP whare as we can get required class object, by page tag in JSP.
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HyderAli
Welcome to the Java Ranch, we hope you’ll enjoy visiting as a regular however,
your name is not in keeping with our naming policy here at the ranch. Please change your display name to an appropriate name as shown in the policy.
Thanks again and we hope to see you around the ranch!!
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you get an object as a bean you can use all of the getProperty and setProperty methods. Those will not work with a normal class instance you would get from another tag.
Also by creating a bean and conforming to all of the required rules you have a much better chance of creating somehtng that is truely a reusable component instead of just some class that does the job for that particular application.
 
Hyder Ali
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, Dave for my correction, u are supposed to help me in future. Actually I am new here and java.
Finally I wanted to ask about MVC (Design Pattern), what is this.
awaiting for reply............
 
Amir Kamran
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!
MVC (Model View Controller) pattern allow us to separete the application data which is model from the graphical presentation which is view and input processing logic which is controller.
The use of Beans is also an implementation of MVC.
through the use of beans we can seperate the programming logic from the presentation using jsp.
A jsp programmer just uses the tags and design a graphical presentation while the bean writer handle the logic in java classes. This is helpful for the jsp designer b/c he not needs to know java programming.
 
Hyder Ali
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks… Amir u cleared my point that I wanted.
One more question where can get jsp tag library.
However I am busy in scjp preparation or other points can u help me to any aspect.
Please contact: hyder78us@yahoo.com
[ May 20, 2002: Message edited by: Hyder Ali ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are a number of tag libraries! For example, the taglibs project at:
http://jakarta.apache.org
Sun also has a standard Taglibs project, hunt around at java.sun.com
The www.orionserver.com site had a taglibs tutorial and a big collection last time I looked.
Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!