JSTL improves JSP to simplify the implementation of web pages (1)

Source: Internet
Author: User
Tags html page tld java web tomcat
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>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.