Explain the difference between custom JSP tags and beans?


  • Custom JSP tag is the one the user defines. The user defines how the tags, its attributes and its body should be interpreted, and then the user groups the tags collections called tag libraries that can be used in large number of JSP files.
  • Even though custom tags and beans accomplish almost the same objectives of encapsulating complex behavior into simple and accessible forms there are several differences:
  • Custom tags can manipulate JSP content; beans cannot.
  • Complex operations can be reduced to a significantly simpler form with custom tags than with beans.
  • Custom tags require quite a bit more work to set up than do beans.
  • 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.
  • Custom tags are available only in JSP 1.1 and later, but beans can be used in all JSP 1.x versions.


Enter your email address to get our daily JOBS & INTERVIEW FAQ's Straight to your Inbox.

Make sure to activate your subscription by clicking on the activation link sent to your email