[ 
http://jira.magnolia-cms.com/browse/MAGNOLIA-2608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21023#action_21023
 ] 

Philipp Bracher commented on MAGNOLIA-2608:
-------------------------------------------

The only way to make freemarker happy if the tld is not in the jar (this is the 
case if you develop in eclipse for instance) is to copy the tld files to 
WEB-INF and register the tlds in the web.xml.

{code}
  <jsp-config>
    <taglib>
        <taglib-uri>cms-taglib</taglib-uri>
        <taglib-location>cms-taglib.tld</taglib-location>
    </taglib>
    <taglib>
        <taglib-uri>cms-util-taglib</taglib-uri>
        <taglib-location>cms-util-taglib.tld</taglib-location>
    </taglib>
  </jsp-config>
{code}

> Tag library support in freemarker does't work with expanded jars
> ----------------------------------------------------------------
>
>                 Key: MAGNOLIA-2608
>                 URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-2608
>             Project: Magnolia
>          Issue Type: Bug
>          Components: templating
>    Affects Versions: 4.0 M2
>            Reporter: Fabrizio Giustina
>            Assignee: Fabrizio Giustina
>
> freemarker can't load tag libraries when magnolia (magnolia/trunk) is run 
> inside eclipse. The magnolia webapp is run from the eclipse workspace, 
> without copying resources to a standard webapp layout (WEB-INF/lib doesn't 
> exists and taglib modules are not jarred).
> Unfortunately freemarker looks for taglib in a WEB-INF/lib folder explicitly 
> and dies with a NPE if the folder is missing:
> Caused by: java.lang.NullPointerException
>       at 
> freemarker.ext.jsp.TaglibFactory.getLocationsFromLibJars(TaglibFactory.java:290)
>       at 
> freemarker.ext.jsp.TaglibFactory.getMoreTaglibLocations(TaglibFactory.java:206)
>       at freemarker.ext.jsp.TaglibFactory.get(TaglibFactory.java:163)
> .. or simply complains about the missing taglib if an empty WEB-INF/lib 
> directory is created:
> freemarker.template.TemplateModelException: Could not find webapp resource 
> /cms-taglib
>       at freemarker.ext.jsp.TaglibFactory.loadTaglib(TaglibFactory.java:432)
>       at freemarker.ext.jsp.TaglibFactory.access$300(TaglibFactory.java:106)
>       at freemarker.ext.jsp.TaglibFactory$Taglib.load(TaglibFactory.java:414)
> (tried by simply adding the demo-project dependency to the empty webapp)
> unfortunately really annoying during development... 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to