Difference between custom JSP tags and beans?

Custom JSP tag is a tag you defined. You define how a tag, its attributes and its body are interpreted, and then group your tags into collections called tag libraries that can be used in any number of JSP files. Custom tags and beans accomplish the same goals — encapsulating complex behavior into simple and accessible forms. There are several differences:
  1. Custom tags can manipulate JSP content; beans cannot.
  2. Complex operations can be reduced to a significantly simpler form with custom tags than with beans.
  3. Custom tags require quite a bit more work to set up than do beans.
  4. 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.
  5. Custom tags are available only in JSP 1.1 and later, but beans can be used in all JSP 1.x versions.

Search Topics

Popular Posts