Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

What is difference between custom JSP tags and beans?
JSP has its own tag library that you can use in any nuber of pages. You can also create your own tags (Cusustom tags), define attributes and body of the tags and then group your tags into collections called tag library.

To use custom JSP tags, you need to define three separate components:

  * Tag handler class.
  * Tag library descriptor file.
  * JSP file that uses the tag library.
When the first two components are done, you can use the tag by using taglib directive.

JavaBeans are Java utility classes you defined. Beans have a standard format for Java classes. Custom tags and beans accomplish the same goals � encapsulating complex behavior into simple and accessible forms.
Difference between custom JSP tags and beans :

  * Custom tags require more work to set up than do beans.
  * Custom tags can manipulate JSP content, beans cannot.
  * Custom tags usually define relatively self-contained behavior, whereas beans are often defined in one servlet and used in a different servlet or JSP page.