PDA

View Full Version : Is JSTL functions (fn) supported in Spring MVC?


biguniverse
Aug 27th, 2005, 12:31 AM
I tried installing the latest version of Jakarta standard.jar but got an exception with Spring.

I'm trying to use the JSTL functions (fn.tld) stuff for trimming strings.

Has anyone successfuly used this with Spring MVC?

Colin Yates
Aug 27th, 2005, 10:49 AM
AFAIK there is no reason why it shouldn't work.

What exception do you get?

martinl
Aug 27th, 2005, 01:17 PM
Yes. I'm using the fn: functions. :)

rstearns01
Aug 27th, 2005, 07:09 PM
It's probably the version of your server. I had problems with an earlier Weblogic 8.1 release.

biguniverse
Aug 28th, 2005, 11:17 AM
Thanks, everyone for your replies.

First, I'm using WebLogic 8.1 SP4.

Second, here is the exception shown in the browser:
/test.jsp(1): Error in using tag library uri='/WEB-INF/fn.tld' prefix='fn': Tag Library Descriptor contains no Tag descriptions
probably occurred due to an error in /test.jsp line 1:
<%@ taglib prefix="fn" uri="/WEB-INF/fn.tld" %>
Third, here are my code excerpts:

<%@ taglib prefix="fn" uri="/WEB-INF/fn.tld" %>
<h1>'<c:out value="${fn:trim(' MYSTRING '}"/>'</h1>

biguniverse
Aug 28th, 2005, 11:28 AM
P.S. I just deployed the standard-examples.war from the jakarta-taglibs-standard-1.1.2 download and got the same error:

/functions/Trim.jsp(2): Error in using tag library uri='http://java.sun.com/jsp/jstl/functions' prefix='fn': Tag Library Descriptor contains no Tag descriptions
probably occurred due to an error in /functions/Trim.jsp line 2:
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

Since WebLogic 8.1 SP4 only supports these versions, does that mean, I cannot use the "fn" functions?
Servlet 2.3 and 2.2
JSP 1.2 and 1.1