Could you please tell me if jsp:root is mandatory to be declared in a jsp document like
when I execute the above code I get the following:
When I execute the above code without jsp:root I get the following output:
Does this mean that in order to produce a jsp document it is not necessary to include jsp:root tag since there is no compilation error or is it necessary the former format where the output was obtained in html format.
I do not understand your question. As per my knowledge this happens to be the JSP document syntax which starts with JSP root. But is this necessary too include in the document or can we create a document without including this jsp:root tag?
The first is not a strict XML format and is what should be used when hand coding JSPs. The second, the JSP Document, is strict XML, and is designed to be built and manipulated by programs.
I think Bear was asking if you were coding the second by hand, and, if so, why?.
ok I am actually preparing for SCWCD and one question I came across is "if jsp:root is mandatory to create a jsp document " so I tried out the above code including and exclusing jsp:root ... so what I am actually trying to understand is if jsp:root is that ca we create a jsp docuemt without including jsp:root?
JSP2.0 Section6.2.2 said that: "A JSP document may or not have a <jsp:root> as its top element; <jsp:root> was mandatory in JSP 1.2, but we expect most JSP documents in JSP 2.0 not to use it." [ June 21, 2008: Message edited by: Pham Hoai Van ]