Dynamic Web Sites with XML, XSLT and JSP (2/4) - exploring XML
Dynamic Web Sites with XML, XSLT and JSP
Software
As mentioned earlier, the basis for our approach is a JSP-enabled Web server. We use for our example the popular and easy to install Tomcat servlet engine, the successor of the well-known JServ engine in the Jakarta project. It provides, besides the servlet container, also a runtime environment for JSPs. The big advantage of Tomcat is that it can be operated in stand-alone mode and therefore as a full Web server as well as with dedicated Web servers such as Apache, Microsoft Internet Information Server and Netscape Enterprise Server. Since Tomcat is written in Java, it requires a Java runtime version 1.1 or higher. To set it all up:
- Download and install Java
- Download Tomcat
- Set TOMCAT_HOME and JAVA_HOME
- Start Tomcat with startup.sh or startup.bat
- Point your browser to the start page at https://localhost:8080
- Create directories under TOMCAT_HOME/webapps:
- xslt
- xslt/xml
- xslt/WEB-INF
- xslt/WEB-INF/lib
- Download Xalan
- Unpack Xalan and drop xerces.jar, xalan.jar, and bsf.jar into xslt/WEB-INF/lib
- Download Jakarta Taglib
- Unpack Taglib and drop xsl.jar into xslt/WEB-INF/lib, xsl.tld into xslt/WEB-INF
- Create xslt/WEB-INF/web.xml:
<taglib> <taglib-uri>https://jakarta.apache.org/taglibs/xsl-1.0</taglib-uri> <taglib-location>/WEB-INF/xsl.tld</taglib-location> </taglib>
- Restart Tomcat
An example follows.
Produced by Michael Claßen
URL: https://www.webreference.com/xml/column37/2.html
Created: Aug 15, 2001
Revised: Aug 15, 2001