Id like to use StringUtils.abbreviate() inside a jstl tag, is there a taglib location for this?
Ive searched the commons site and the web but an unable to find an example. Is there a common way to find taglib locations also, maybe in a standard location of a javadoc tree??
Thanks!
Nic
Nic,
There often isn’t a predefined tag to get at the apache util methods, but it’s easy to add your own special tag definitions to point to the method you want. For example, add a local taglib definition to your web.xml file:
Your mytaglib.tld file will look something like this:
In your JSP, you can then use your new custom tag:
That should do it for you. For more info on custom tags, you can read here: http://docs.oracle.com/javaee/5/tutorial/doc/bnalj.html