Q:

Can you get the filename of the jsp file using a taglib in the taglib code

Is it possible to get the filename of the jsp file that uses a taglib from the java code?
I.e.
public int doStartTag() throws JspException 
{
    try
    {
        String xxx = pageContext.?

Where xxx would get the filename of the jsp file (which of course could be a nested include file)
br
/B

A:

It's not possible to get the name of the JSP file simply because at this point it has been compiled and you're dealing with compiled version rather than source JSP file.
You can get the name of the class JSP has been compiled into via
pageContext.getPage().getClass().getName();

and try to derive the JSP name from it but the naming scheme differs between JSP containers.

