Using with XML
JSP pages can be used to generate XML pages.
The JSP specification provides a way for XML tools to author and manipulate JSP pages, by converting JSP tags to their XML equivalents.
- add a JSP root element to the document
- convert elements and directives to their XML equivalent, e.g. instead of <% and %> scriptlet markers, use <jsp:scriptlet> and </jsp:scriptlet> XML tags.
- create CDATA elements for all other (typically non-JSP) elements on the page