Forums Register Login

jsp document

+Pie Number of slices to send: Send
Hello,

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.

Please help!
+Pie Number of slices to send: Send
Are you writing JSP document syntax by hand? Why?
+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
There are two syntaxes (sp?) for JSP.

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?.
+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
Thanks I got that!!!
rubbery bacon. rubbery tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 825 times.
Similar Threads
XML syntax for jsp
Converting JSP to XML
Request-Time Attribute Expressions
alternate to jsp:declaration
Head First - Final Mock Exam, Q55
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 04:22:57.