Overview
The release of Java Server Pages (JSP) Standard tag Library (JSTL) is a major progress for JSP/servlet developers. With an Expression Language (EL) and a group of four powerful and easy-to-learn standard tag libraries, JSTL is likely to soon become the main method for implementing dynamic and Java-based websites.
The introduction to JSP servlet in 1996 made Java a reasonable choice for dynamic web page development. The subsequent Java Server Page (JSP) is a step towards a rapid and maintainable Java Web page implementation process, followed by JSP tag support. However, the JSTL (JSP standard tag Library) release in the middle of 2002 is the biggest step to further accelerate and simplify the development process.
In this article, I have explained the JSTL function and everything you need to start JSTL. Suppose you have a basic understanding of Java, JSP, XML, and installing a Web container. If you are unfamiliar with these theme, you can go to Resources (http://www.javaworld.com/javaworld/jw-02-2003/jw-0228-jstl.html? # Resources. In the following illustration, assume that you have knowledge of XML and SQL.
Install JSTL support
For our JSTL installation example, we use Tomcat 4.1 (although any Servlet container that supports servlet 2.3 and JSP1.2 should work ). Download Tomcat 4.1 and install it as instructed (Note: JSTL requires a JSP1.2 Web container ).
Use the Tomcat 4 startprogram to start Tomcat and run the index.html page to ensure that Tomcat is activated and runs well.
Next, install JSTL support, you can download JSTL support from the Jakarta site, (http://www.javaworld.com/javaworld/jw-02-2003/jw-0228-jstl.html? # Resources) and follow the steps below:
1. Download The JSTL search, decompress/unarchive file from the Jakarta site. (Http://www.javaworld.com/javaworld/jw-02-2003/jw-0228-jstl.html? # Resources)
2. copy the jar file that has been decompressed as common/lib to your Tomcat installation path (although our project does not need all jar files ); this makes the JSTL file suitable for any Web application.
3. For any Web application that you want to use JSTL, copy the. tld file to the WEB-INF directory of your Web application.
4. For your JSTL Web application, edit web. xml and add the following input:
<Taglib>
<Taglib-uri> http://java.sun.com/jstl/fmt </taglib-uri>
<Taglib-location>/WEB-INF/fmt. tld </taglib-location>
</Taglib>
<Taglib>
<Taglib-uri> http://java.sun.com/jstl/core </taglib-uri>
<Taglib-location>/WEB-INF/c. tld </taglib-location>