When using the project, the MVC structure is used in the view layer jstl, which is very useful. Summarize the usage experience
In jstl1.0, due to lack of functions libraries, it is not very practical. For example, simple substring and trim must be completed using Java. In Version 1.1, this library is added and El expressions are added, this eliminates the hassle of <C: out, so this article discusses jstl1.1
I. servlet 2.4 is required
This is the easiest place for many new users to make mistakes. Check your web. XML to see if there are any of the following words:
< Web-app ID = "Webapp_id" Version = "2.4" 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 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >
Even if jstl is not used, we strongly recommend that you use the servlet2.4 specification.
If the servlet specification is not 2.4, the El expression below is not supported.
${1 + 2 + 3}
Must be written
<C: Out value = '$ {1 + 2 + 3}'/>
2. JDK 1.4.2 or later is recommended.In this way, you can load a lot of second-party component packages.
With jdk1.4.2, you only need the following two packages. Otherwise, Google will check it out.
3. Download jstl. Jar standard. JarIf they are missing
Jstl. jar is the connector class and interface of jstl.
Standard. jar is the reference implementation (RI) of jstl. jar, developed by the Apache taglibs Project
4. reference the tag library on the JSP page
<% @ page Language = "Java" contenttype = "text/html; charset = GBK "pageencoding =" GBK "%>
<% @ taglib uri =" http://java.sun.com/jsp/jstl/core "prefix =" C "%>
<% @ taglib uri =" http://java.sun.com/jsp/jstl/fmt "prefix =" FMT "%>
<% @ taglib uri =" http://java.sun.com/jsp/jstl/functions "prefix =" FN "%>
SQL library is not needed, the XML library is rarely used. Generally, it is okay to include the preceding three labels.