The test worked. My original jsp pages still have the same problem. I should be able to figure it out. Thanks a lot.
-----Original Message----- From: Kris Schneider [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 7:47 AM To: Tag Libraries Users List Subject: RE: JSTL Function Library Really, if you're going to stick with Servlet 2.4/JSP 2.0 then you should go with JSTL 1.1. On the other hand, if your app still needs to run under Servlet 2.3/JSP 1.2 then you should stick with JSTL 1.0. I'm not sure why you can't get JSTL 1.1 to work, but try a simple test app like this: index.jsp: ---------- <%@ page contentType="text/plain" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <c:set var="str" value=" test string "/> str: [${str}] str trim: [${fn:trim(str)}] WEB-INF/web.xml: ---------------- <?xml version="1.0" encoding="ISO-8859-1"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app> WEB-INF/lib/: ------------- jstl.jar standard.jar Your output should look like this: str: [ test string ] str trim: [test string] Quoting [EMAIL PROTECTED]: > I have Tomcat 5.0.19. > I have downloaded the Standard-1.1 file. > I have put jstl.jar and standard.jar in the WEB-INF/lib folder. > I have copied your code for creating a Servlet 2.4 web.xml file > I am using the taglib directives as you have written: > http://java.sun.com/jsp/jstl/core > I've restarted Tomcat a few times. > > Do I lose anything important by staying with the old JSTL? I haven't had > much success with setting up JSTL and consider it a miracle that I got any > part of it to work. > > -----Original Message----- > From: Kris Schneider [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 06, 2004 12:20 PM > To: Tag Libraries Users List > Subject: RE: JSTL Function Library > > There's really nothing you need to do to the server*, just make sure it > supports > JSP 2.0. You appear to be using Tomcat 5, so you should be fine (you might > want > to make sure you've got the latest version: 5.0.19). As for your app, all > you > should need to do is download Standard-1.1 and place jstl.jar and > standard.jar > in WEB-INF/lib. Make sure you're using a Servlet 2.4 web.xml and that you're > using the proper URIs in your taglib directives: > > http://java.sun.com/jsp/jstl/core > http://java.sun.com/jsp/jstl/xml > http://java.sun.com/jsp/jstl/fmt > http://java.sun.com/jsp/jstl/sql > http://java.sun.com/jsp/jstl/functions > > *If you want to make use of the XML/XSLT tags, you'll probably want to > download > the latest version of Apache's Xalan and place xalan.jar and xercesImpl.jar > in > $CATALINA_HOME/common/endorsed. > > Quoting [EMAIL PROTECTED]: > > > Thank you. I've changed both the conf web.xml file and the local we.xml > > file within WEB-INF. I've restarted and still have the same problem. The > > book I bought on JSTL must be old because it does not mention JSTL 1.1. > It > > was the only book in the bookstore. Is there a web page that will tell me > > how to prepare my server for JSTL 1.1? > > > > -----Original Message----- > > From: Kris Schneider [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, April 06, 2004 11:36 AM > > To: Tag Libraries Users List > > Subject: RE: JSTL Function Library > > > > Make sure you're also using a Servlet 2.4 web.xml: > > > > <web-app xmlns="http://java.sun.com/xml/ns/j2ee" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > > > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" > > version="2.4"> > > ... > > </web-app> > > > > Quoting [EMAIL PROTECTED]: > > > > > Thanks. Someone on this board told me that before. > > > > > > When I use : <%@ taglib prefix="c" > > uri="http://java.sun.com/jsp/jstl/core" > > > %> followed by <c:out value = '${param.search}'/>, the outout is > > > ${param.search} instead of the search parameter value. When I use the > > other > > > library it works as expected. Any ideas why? > > > > > > -----Original Message----- > > > From: Kris Schneider [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, April 06, 2004 11:16 AM > > > To: Tag Libraries Users List > > > Subject: Re: JSTL Function Library > > > > > > Make sure you're using JSTL 1.1. > > > > > > <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> > > > <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> > > > > > > Functions are really part of the EL, so use them within an EL > expression: > > > > > > ${fn:trim(row.user_id)} > > > > > > Quoting [EMAIL PROTECTED]: > > > > > > > I am using Tomcat 5.X. I'm not sure which version of JSTL I have, but > > > here > > > > is my jsp reference: > > > > <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> > > > > > > > > I wanted to trim a variable I get from a database. I've searched the > > Sun > > > > website and have found the function library. > > > > <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> > > > > > > > > I'm having trouble using this. > > > > > > > > Here is the tag: > > > > <fn:trim(row.user_id)/> > > > > > > > > Here is the error: > > > > No tag "trim(row.user_id)" defined in tag library imported with prefix > > > "fn" > > > > > > > > I'm not sure if it is a version thing or what. Do I need to make a > tld > > > file > > > > for this? I can't find this library on the Jakarta web site. Should > I > > > just > > > > use Jakarta's String library? > > > > > > -- > > > Kris Schneider <mailto:[EMAIL PROTECTED]> > > > D.O.Tech <http://www.dotech.com/> > > > > -- > > Kris Schneider <mailto:[EMAIL PROTECTED]> > > D.O.Tech <http://www.dotech.com/> > > -- > Kris Schneider <mailto:[EMAIL PROTECTED]> > D.O.Tech <http://www.dotech.com/> -- Kris Schneider <mailto:[EMAIL PROTECTED]> D.O.Tech <http://www.dotech.com/> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]