Reputation: 12736
In my JSP there is code:
<img src="<c:out value="${requestScope['img_url']}"/>"/>
I would like to replace it with something like this:
<xyz:img src="${requestScope['img_url']}"/>
I tried Struts Taglib, but it requires Struts. Is there any other alternative?
Upvotes: 2
Views: 2190
Reputation: 3456
This is just custom JSP tags. There is a great Sun/Oracle tutorial (archived page) and lots of other great resources out there.
Here are some of the Oracle's resources:
Upvotes: 3
Reputation: 12736
This article helped me to find a very simple solution: Encapsulating Reusable Content Using Tag Files
<%@taglib tagdir="/WEB-INF/tags" prefix="xyz" %>
Upvotes: 1