Charles Barouch
Charles Barouch

Reputation: 313

How do I find the code behind a JSP taglib?

I'm working on Tomcat5 (and migrating to tomcat6). We use JSP taglibs because that's how the site was delivered to us. The vendor build their tags, which has been very useful, but I've operated them like a black box. I know what goes in, I know what goes out, I know what one line to put in the header of each JSP page.

If you have tag, like <irv:> as in

<irv:validate name="status" datatype="API.STAT" datasource="local">*

and you know the tag line looks like this

<%@ taglib uri="/WEB-INF/tlds/inv.tld" prefix="irv" %>

How do you find the Java code behind it all?

All help appreciated.

Upvotes: 3

Views: 1412

Answers (1)

BalusC
BalusC

Reputation: 1109665

Read the /WEB-INF/tlds/inv.tld file in a text editor. It contains tag definitions and for the <irv:validate> it'll contain something like

<tag>
    <name>validate</name>
    <tag-class>com.example.ValidateTag</tag-class>
    ...
</tag>

The <tag-class> gives you the full qualified classname of the backing Java code of the tag.

See also:

Upvotes: 2

Related Questions