Tarun Ramakrishna Elankath wrote:
>
> Hi all,
>    I apologize if anybody gets miffed at this pedantic question.
>   Is it recommended to use the alternate XML based syntax for directives,
> scriptlets & declarations ? For example is it okay to use
> <jsp:declaration>...</jsp:declaration> within a <jsp:root></jsp:root>
> element  instead of a <%! ... %>. What are the pros / cons (if any) of
> adopting the XML based syntax ?

The XML equivalents were not completely defined in JSP 1.1, and many
containers (notably the reference implementation, Tomcat 3.x) doesn't
support them. So I suggest that you don't use them.

JSP 1.2 is a different story, though. The complete XML representation
of a JSP page is defined in this spec. But the XML format is much
more verbose than the current format, and requires all template data
to be within CDATA blocks, etc. If you write JSP by hand, you'll
probably want to stick to the current syntax even with JSP 1.2. The
XML representation is primarily intended for tools.

Hans
--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://TheJSPBook.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to