Generate Web Output in Multiple Formats and Languages with StrutsCX : Page 5
StrutsCX overcomes the limitations of the Struts Framework by enabling you to utilize XML, XSLT, and XPath technologies instead of its standard JavaServer Pages.
by Bernhard Woehrlin
Mar 12, 2003
Page 5 of 5
The Advantages of Doing It the StrutsCX Way
Using XSLT in the Struts View has the following benefits:
The whole Web application gets rid of all the JSP and the Tag Libraries. Because lots of declarations can be skipped, the web.xml suddenly gets lithe and lissome.
You don't have to cram all these Tags. Instead, you deal with the XSLT and XPath standard, knowledge of which you can use outside the Java world.
You can't put business logic inside your XSL Stylesheets. Separation of data, application logic, and the graphical representation of data is part of the XSLT concept.
XSLT is open for all kinds of output formats: Text, HTML, and XML in all their flavors. There are no HTML-centric concepts like with JSP.
XSLT guarantees the output of 100 percent well-formed XML.
No more waiting for your JSP to be transformed into servlets and compiled into the Servlet Container. The XSL Stylesheets can be used right out of the box.
With XSLT, it's easy to generate an output pipeline for the view by putting several transformations in a row. This way you can write sequential XSL Stylesheets and send your XML from one to another.
Separation of layout and style is possible using XSLT. By defining special layout templates, you can separate the biggest part of your HTML code from the XSL Stylesheets.
Bernhard Woehrlin is an XML architect and Web developer in Hamburg, Germany. He is a Sun-Certified Web Component Developer and an IBM Certified Developer - XML and Related Technologies. He is also co-author of a book about Struts published in Germany. To find out more about him, visit his Web site or reach him by e-mail at email@example.com.