From the course: Java EE: Servlets and JavaServer Pages (JSP)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Custom tag library

Custom tag library

From the course: Java EE: Servlets and JavaServer Pages (JSP)

Start my 1-month free trial

Custom tag library

- [Instructor] Okay, so now that we have seen JSP standard actions, expression language, JSTL, let's say that you want to implement a requirement which is not allowing you to choose any tag from JST. Let's say that's something that you want to implement for which there is no tag existing under the Java server pages tag library. So, in that case, you can make your own tag library which is the custom tag library defined by the developer, right. So, custom tag library is basically going to consist of a user-defined JSP element and, when it's a library, of course it can contain one or more tags bundled together and you can bundle them in a jar file and make sure that the jar file is used by a few other projects so that it promotes re-useability as well. Now, in order to develop a custom tag library, you of course need to write your own tags but as we saw, that when we write a tag on a JSP, it's not just a tag. There's some Java code that executes behind the tag, right? So whenever, the…

Contents