Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Error in using JSTL EL functions  RSS feed

 
Darren Alexandria
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good day!

I have used JSTL EL core (<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>)
in my application, now I want to use functions.

I put it in the page where I want to utilize it:
<CODE>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
</CODE>

and this is present in my web.xml
<CODE>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
</CODE>

I also put jstl.jar and standard.jar in my WEB-INF/lib folder and also in my Tomcat/commons/lib.

I have used this example:

"${fn:length(strUnit)}"


After doing those things, I have encountered this error:

javax.servlet.ServletException: The class org.apache.taglibs.standard.functions.Functions specified in TLD for the function fn:length cannot be found: org.apache.taglibs.standard.functions.Functions
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)

Is there something I missed?
Thanks.


Darren
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65830
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure that the jar files are for JSTL 1.1?
 
Darren Alexandria
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have found the solution, download the latest JSTL jar.

Thanks for your reply!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!