Reputation: 2537
I am making a custom jsp tag and need to access one of the attributes inside a scriptlet in the tag file. What do I call to access it.
<%@ tag import="com.package.model.Pojo"%>
<%@ attribute name="pojo" type="com.package.model.Pojo"%>
<%
Pojo pojo = ????
%>
Upvotes: 2
Views: 670
Reputation: 2537
Just took a wild guess and figured it out. Don't declare it but simply start accessing it. IE:
<%@ tag import="com.package.model.Pojo"%>
<%@ attribute name="pojo" type="com.package.model.Pojo"%>
<%
pojo.getFoo();
%>
Upvotes: 2