Abutalib Shaikh
2016-04-21 05:56:36 UTC
Hello all,
We are facing problem while integrating custom tag library in freemaker
template.
We are using Jforum2.1.8 , Tomcat 7 and freemarker-2.3.9 in our development
environment.
The configuration of .tld file as
<?xml version="1.0" encoding="UTF-8"?>
<taglib version="2.0" 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/j2ee
http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd">
<description>
Social Sharing tag library.
</description>
<display-name>Social Sharing Taglib</display-name>
<tlib-version>1.0</tlib-version>
<short-name>forms</short-name>
<uri>/WEB-INF/taglibs/social-sharing</uri>
<tag>
<description>
Display Social Icons.
</description>
<name>SocialSharingButton</name>
<tag-class>com.social.tags.SocialSharingButtonTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<name>service</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>url</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>countEnabled</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>text</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>summary</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>source</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>status</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>label</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>
*
We include taglibs as follow in template file *
*<#assign social=JspTaglibs["/WEB-INF/taglibs/social-sharing"]/>*
*But we got following error logs while running sever. *
*Document root element "taglib", must match DOCTYPE root "null".
Document is invalid: no grammar found.*
*
is freemarker support taglibs like JSP taglib
Is there any step we missing for configuration of taglibs? or Is there any
alternate way to configuration of taglibs? Please Suggest.*
Thanks in Advance
--
View this message in context: http://freemarker.624813.n4.nabble.com/Issue-while-integrating-custom-taglibs-in-Freemarker-template-tp4655620.html
Sent from the freemarker-user mailing list archive at Nabble.com.
We are facing problem while integrating custom tag library in freemaker
template.
We are using Jforum2.1.8 , Tomcat 7 and freemarker-2.3.9 in our development
environment.
The configuration of .tld file as
<?xml version="1.0" encoding="UTF-8"?>
<taglib version="2.0" 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/j2ee
http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd">
<description>
Social Sharing tag library.
</description>
<display-name>Social Sharing Taglib</display-name>
<tlib-version>1.0</tlib-version>
<short-name>forms</short-name>
<uri>/WEB-INF/taglibs/social-sharing</uri>
<tag>
<description>
Display Social Icons.
</description>
<name>SocialSharingButton</name>
<tag-class>com.social.tags.SocialSharingButtonTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<name>service</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>url</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>countEnabled</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>text</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>summary</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>source</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>status</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>label</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>
*
We include taglibs as follow in template file *
*<#assign social=JspTaglibs["/WEB-INF/taglibs/social-sharing"]/>*
*But we got following error logs while running sever. *
*Document root element "taglib", must match DOCTYPE root "null".
Document is invalid: no grammar found.*
*
is freemarker support taglibs like JSP taglib
Is there any step we missing for configuration of taglibs? or Is there any
alternate way to configuration of taglibs? Please Suggest.*
Thanks in Advance
--
View this message in context: http://freemarker.624813.n4.nabble.com/Issue-while-integrating-custom-taglibs-in-Freemarker-template-tp4655620.html
Sent from the freemarker-user mailing list archive at Nabble.com.