Expand my Community achievements bar.

Error "File /META-INF/tags/HelloTag.tag not found" when creating custom JSP Tag lib

Avatar

Level 2

Hi All,

I am creating a JSP custom tag using tag file but i am getting following error

org.apache.sling.api.scripting.ScriptEvaluationException: org.apache.sling.scripting.jsp.jasper.JasperException: File "/META-INF/tags/HelloTag.tag" not found

 

tag file is located at /META-INF/tags/HelloTag.tag

Following are content of tag definition file located at //META-INF/taglibs.tld

<taglib xmlns="http://java.sun.com/xml/ns/javaee"        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee        http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_1.xsd" version="2.1">    <tlib-version>1.0</tlib-version>    <short-name>Angular</short-name>    <uri>http://abc.org/Hello/Taglib</uri>    <tag-file>        <name>Hello</name>        <path>/META-INF/tags/HelloTag.tag</path>    </tag-file></taglib>

Also following is the configuration of bundle plugin

 

<plugin>    <groupId>org.apache.felix</groupId>    <artifactId>maven-bundle-plugin</artifactId>    <extensions>true</extensions>    <configuration>        <instructions>            <Bundle-SymbolicName>org.abc.angularjs-tags-aem</Bundle-SymbolicName>            <Sling-Model-Packages>org.abc.web.jsp.angularjs.tags</Sling-Model-Packages>            <Bundle-Resource>/META-INF/tags</Bundle-Resource>            <Sling-Bundle-Resource>/META-INF/tags</Sling-Bundle-Resource>        </instructions>    </configuration></plugin>

I read following blogs for creating this sample.

http://labs.6dglobal.com/blog/2013-07-02/tagfile-vs-tag-sling-or-cq5-application/

http://www.cqblueprints.com/tipsandtricks/jsp-custom-tag-lib.html

https://helpx.adobe.com/experience-manager/using/customtags.html

Also full maven artifact is attached with this form.

17 Replies