Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
The 1996 introduction of Java servlets made Java a reasonable choice for dynamic Webpage development. The subsequent debut of JavaServer Pages (JSP) followed by the inclusion of support for JSP tags were logical evolutionary steps toward fast, maintainable Java Webpage implementation. But the mid-2002 release of JSTL (JSP Standard Tag Library) represents perhaps the biggest step yet in speeding and simplifying the development process further.
In this article, I explain JSTL's capabilities and cover everything you need to get started with JSTL. It's assumed you have a basic understanding of Java, JSP, XML, and setting up a Web container. If you're not comfortable with these topics, you might want to browse the background references in Resources. Additional assumed knowledge is described in the XML and SQL sections below.
For our JSTL installation example, we use Tomcat 4.1 (although any servlet container that supports the Servlet 2.3 and JSP 1.2 specifications should work). First, download Tomcat and follow the setup instructions. (Note that JSTL requires a JSP 1.2 Web container.)
Start Tomcat with
tomcat4 start and load the index.html page to make sure Tomcat is alive and well.
Next, you'll need to install JSTL support. You can download JSTL support from the Jakarta Website then follow these steps:
common/libin your Tomcat installation (although you won't need all the jar files for our project). This makes the JSTL jar files available to any of your Web applications.
.tldfiles to the
WEB-INFdirectory in your Web application.
web.xmlfile and add the following entries:
<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> </taglib> <taglib> <taglib-uri>http://java.sun.com/jstl/sql</taglib-uri> <taglib-location>/WEB-INF/sql.tld</taglib-location> </taglib> <taglib> <taglib-uri>http://java.sun.com/jstl/x</taglib-uri> <taglib-location>/WEB-INF/x.tld</taglib-location> </taglib>
These entries let your Web application use the expression language (EL) versions of the JSTL tag libraries. Position of these
entries matters! If you're not sure where to put them, the definitive guide to
web.xml options and ordering is defined in the document type definition (DTD) at: http://java.sun.com/j2ee/dtds/web-app_2_2.dtd.
First, all JSTL pages are also JSP pages. JSTL is just a superset of JSP functionality.
Also, all JSTL tags are valid XML. That means if you treat the context of a page outside the JSTL tags as template text (which will normally be HTML), the remaining JSTL tags must parse as valid XML. This has some important implications, most of which are good.