In order to use custom tags in JSP,we used to have TLD files,along with a Java class to define the custom tags but post JSP 2.0 specs,the same can be achieved,without the need for any Source code files,making it easy to maintain and it can also be created by someone with basic knowledge of JSP tags without need for java code.
Usually for adding static content to a HTML page,we use either
link rel="import" tag (in HTML5) or jQuery .load("")
to include any external content.In case of any dynamic content,using JSP,we use
jsp:include
to include such content.But for cases,when we want to add custom content,which can interact with the existing content,we use custom JSP tags.They allow us to generate custom content,based on params from the caller and also pass back values processed in the custom tag back to the caller.
References: