Hi Hans, I have put JSTL 1.0 jar files in the WEB-INF/lib and it still won't read my script. In tomcat 5 I tested out just the core library and it doesn't give me the functionality I desire, what I want is core_rt for run time EL. But because Tomcat 4 doesn't have such thing, I'm stuck. And I must use Tomcat 4 because of the provider. My friend can't afford a provider with tomcat 5 on it. Wallace
-----Original Message----- From: Hans Bergsten [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 2:24 PM To: Tag Libraries Users List Subject: Re: is this link correct? Wallace wrote: > Hi Manos, > I cannot change the provider because I am writing this jsp for a > friend and he is set on using this provider due to costs. I am stuck > with a tomcat 4 container and just wondering what I would have to do to > make it work for tomcat 4 instead. In jstl what is the syntax to extract > an html form's input data? Do I need to use <c:out>? And do I have to > create a web.xml to refer to tlds? Or can I just use a uri like I did > for tomcat 5? I did all my development and testing in tomcat 5, so JSP 2 > syntax is all I know. For JSP 1.2 (e.g., Tomcat 4.x), you should use the JSTL 1.0 EL libraries: <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> <%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %> <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %> and a Servlet 2.3 web.xml file: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> ... </web-app> For JSP 2.0 (e.g., Tomcat 5.x), you should use the JSTL 1.1 libraries: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> and a Servlet 2.4 web.xml file: <?xml version="1.0" encoding="ISO-8859-1"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3c.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> ... </web-app> For both JSP versions, just place the JSTL implementation JAR files (e.g., all JAR files in "lib" directory the Standard tag library binary distribution) in the WEB-INF/lib directory of the web application and use the appropriate taglib directives in the JSP pages, as shown above. Do _not_ use any tag library declarations in the web.xml file. At best, they are redundant since JSP 1.2, at worst they cause the application to fail. Some containers already include a JSTL implementation, so you don't have to put any JSTL implementation JAR files in WEB-INF/lib, but doing so shouldn't hurt anything. Hans -- Hans Bergsten <[EMAIL PROTECTED]> Gefion Software <http://www.gefionsoftware.com/> Author of O'Reilly's "JavaServer Pages", covering JSP 1.2 and JSTL 1.0 Details at <http://TheJSPBook.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]
