java


JSP tags in a Freemarker template


I want to use some custom tags in a freemarker template which is easy enough as I can include the JspSupportServlet in my web.xml file and include the folowing line in the template.
<#assign my=JspTaglibs["/WEB-INF/mytaglib.tld"] />
However how do I go about doing this if the .tld is bundled in a JAR file inside the META-INF directory? I tried both of these with no luck.
<#assign my=JspTaglibs["/META-INF/mytaglib.tld"] />
<#assign my=JspTaglibs["/mynamespace"] />
FreeMarker automatically scans all JAR files in your WEB-INF/lib directory. If it finds .tld files inside a JAR's META-INF directory, like your META-INF/mytaglib.tld, it will peek inside it in order to find the <uri> tag. If it finds one, it will make the taglib available via this URI, e.g a taglib defined like
<taglib>
<shortname>my custom taglib</shortname>
<uri>http://example.org/mytaglib</uri>
<!-- ... -->
</taglib>
can be used in FreeMarker via
<#assign my=JspTaglibs["http://example.org/mytaglib"] />
At least this worked for me...

Related Links

What is the Tensorflow Java Api `toGraphDef` equivalent in Python?
How to gracefully wait to job task finish in BlockingQueue java
Abnormal case of input in java [duplicate]
Parity flag in java
Ant to maven Manifest attribut set from class
Java - for loop - input Scanner - String
Custom AsyncUncaughtExceptionHandler breaks Spring caching
Xiaomi Band 1S heartrate measuring doesn't work
Rest Assured Bearer authentication
how to create bookmarks in PDF file using Tesseract API in java
How to make a deep copy of a multidimensional array list
Android difficulty with menu popup
java.lang.NullPointerException in Unit Testing spring service class
Android: Error while installing APKs
Onedrive API Access Denied error
Is setting up jdbc url property through an EntityManager instance re-open the connection

Categories

HOME
xamarin
vbscript
webpack
zeromq
openstack
tizen
drivers
ravendb
networkx
dacpac
maude-system
floating-action-button
circular-dependency
dosgi
facebook-page
jsdoc
pugjs
reactcsstransitiongroup
pythonanywhere
contextmenu
google-cloud-speech
grails3
javacv
tdd
pepper
virtualdub
typo3-6.2.x
quote
bpel
flink-streaming
xquery-3.0
copying
pim
fusionpbx
jmonkeyengine
scaffold
space-complexity
dynamics-crm-2013
az-application-insights
reportbuilder
hp-ux
powershell-dsc
nand2tetris
import-from-excel
fault
pango
paxos
fancybox-2
mplayer
drupal-6
font-size
windows-iot-core-10
iso8601
vtigercrm
objective-c-swift-bridge
deadbolt-2
grails-tomcat-plugin
infix-notation
probability-density
log4c
savon
login-control
py2app
merge-conflict-resolution
disque
markojs
sdf
pickadate
dataview
quicklisp
embedded-code
arcanist
e10s
nsmutabledictionary
facebook-graph-api-v2.4
block-device
typekit
oxwall
neolane
terminfo
jubula
html5-notifications
geos
dotnetnuke-5
hungarian-algorithm
android-screen-support
kyotocabinet
datawindow
objective-c-2.0
postgresql-performance
custom-backend
subscript
php-parser
spyware
django-tagging
zend-translate
gamequery
dmx512
dentrix
modelstate
bespin
firefox-5
user-friendly
ti-dsp
swing-app-framework
anti-piracy
noscript
defensive-programming
zune
commodore
uiq3

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App