O'Reilly logo

Learning Jakarta Struts 1.2: a concise and practical tutorial by Stephan Wiesner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13.9 XSLT Configuration Overview

The larger an application, the more difficult it is to keep track of configuration information. Since all configurations are in XML files, they can be easily managed through small XSLT scripts.

This subject will just be introduced here. For further details, refer to XSLT Programmer’s Reference by Michael Kay (2nd edition, 2001, Wrox Press, ISBN 1-861005-06-7).

13.9.1 struts-config.xml

Listing 13.13 shows an XSLT script which parses struts-config.xml and outputs the forwards with names and paths.

Listing 13.13: StrutsForwards.xsl
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" />
<xsl:variable name="server" select="’http://127.0.0.1:8080/shop8’"/> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required