[
http://jira.magnolia-cms.com/browse/MAGNOLIA-3092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Danilo Ghirardelli updated MAGNOLIA-3092:
-----------------------------------------
Attachment: taglibs.patch
I'm sorry, I attached the patch and commented the linked issue by mistake, I'll
re-attach everything on this...
Just to refute myself, I attached a patch to do what Philipp suggested. The
attached patch wraps freemarker and tricks it to load jars from all the
classpath when they are requested under WEB-INF/lib.
The counterpart getResourceAsStream has been changed as well to do load files
with absolute paths. This is a potentail security problem, but given that the
method is called only by freemarker class and only with the data provided by
the previous method, there should be no risk of loading random files on
filesystem.
This make possible working with freemarker in Magnolia directly under eclipse,
without deploying.
Just to be clear, this patch is inspired by the freemarker patch linked above,
so credits goes to the original creator.
> freemarker: support for loading taglibs from classpath resources (jars and
> folders) instead of WEB-INF/lib only
> ---------------------------------------------------------------------------------------------------------------
>
> Key: MAGNOLIA-3092
> URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-3092
> Project: Magnolia
> Issue Type: Improvement
> Security Level: Public
> Reporter: Manuel Molaschi
> Assignee: Boris Kraft
> Priority: Major
> Fix For: 4.4.x
>
> Attachments: taglibs.patch
>
>
> it would be useful to have freemarker loading taglibs from classpath
> resources (jars and folders) instead of WEB-INF/lib only.
> I created the MagnoliaTaglibFactory class that, using some code inspired by
> ClasspathResourceUtil, loads tlds searching in jars and folders derived from
> classpath. Then, in method FreemarkerHelper.checkTaglibFactory, i changed line
> taglibFactory = new TaglibFactory(servletContext);
> to
> taglibFactory = new MagnoliaTaglibFactory(servletContext);
> If it's fine for you, i can commit it.
> PS: i've submitted the patch to freemarker
> (http://sourceforge.net/tracker/index.php?func=detail&aid=2954132&group_id=794&atid=100794#)
--
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/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------