JSP Tutorials - Herong's Tutorial Examples - v5.11, by Herong Yang
JSTL in XML Style JSP Pages
This section provides a tutorial example on how to use JSTL tags in XML style JSP pages. The JSTL library needs to be declared as an XML namespace in the 'root' element.
Since I like to write JSP in XML style, I have to find out how to use JSTL in XML style JSP pages. It took me some time to figure out this. Here is an example code, hello_jstl_xml.jsp:
<?xml version="1.0"?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jsp/jstl/core" version="2.3"> <!-- hello_jstl_xml.jspx - Copyright (c) 2006 HerongYang.com. All Rights Reserved. --> <jsp:directive.page contentType="text/html"/> <html><body> <jsp:scriptlet>out.println("Hello world!");</jsp:scriptlet> <br/> <c:out value="Hello world! - from c:out"/> </body></html> </jsp:root>
As you can see in the example,
Table of Contents
JSP (JavaServer Pages) Overview
Tomcat Installation on Windows Systems
Syntax of JSP Pages and JSP Documents
JavaBean Objects and "useBean" Action Elements
Managing HTTP Response Header Lines
Non-ASCII Characters Support in JSP Pages
►Overview of JSTL (JSP Standard Tag Libraries)
Installing GlassFish JSTL on Tomcat
NoClassDefFoundError - LoopTag/ForEachTag
Installing JSTL 1.2 API JAR File
JSTL Example - Loop Tag on Map Objects
Multiple Tags Working Together
Using Tomcat on CentOS Systems
Connecting to SQL Server from Servlet