Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp document

 
Ken Sampson
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65337
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you writing JSP document syntax by hand? Why?
 
Ken Sampson
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?.
 
Ken Sampson
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Pham Hoai Van
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ken Sampson
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks I got that!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic