Women in Technology

Hear us Roar

  Writing JSPs in XML using JSP 1.2
Subject:   Pointless article
Date:   2001-12-02 13:16:00
From:   EugeneKuleshov
This article doesn't make sence for the web developers. XML syntax doesn't provide any benefits comparing with the classic syntax.

Article miss one very important thing. The main reason of using XML syntax in JSP is a possibility to transform youd document into lot of formats such as html, pdf, rtf, wap, etc. To generate any of those formats you don't need to change JSP code but use XSLT transformation (possible run it from JSDK 2.3 filter) with a different XSL template. And only then XML syntax will be really usefull (just to get rid of all those stupid HTML tags).

Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • Not pointless
    2003-11-05 07:58:14  rca2t [View]

    The rationale for putting something in XML should not have to be reiterated each time something becomes XML compliant. The reasons are well-established. But for starters, JSP syntax before XML is really messy and hard to parse if you want to do anything useful with it, such as extracting all of the sql statements you might have embedded using in a JSTL page, and then putting them into another page. With XML, you could quickly write an XSLT transform to do that work for you. In an nutshell, XML offers the prospect of maintenance, not just output to a variety of end-user formats. Granted, the marketing has focused on the latter, but the former is a real boon to programmers. It is, in fact, a great step toward genuine literate programming.