• Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp:root question

 
Andreas Falley
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's something that I don't understand. I've been studying for the scwcd using the Deshmukh book.
In the sample code that they provide, they set the
jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
version="1.2"
But I don't have my linux box (where I code from) online, yet the code runs fine. Indeed, it looks like
Sun doesn't have the page online either.
What is the use of the attributes in this tag? Is any info in the root tag really manditory? It seems to work fine with tomcat4 without the info.
What's going on? Or is tomcat4 just smarter than other servers?
Many thanks!
- Andreas
[LIST]
 
Paul McKenna
Ugly Redneck
Ranch Hand
Posts: 1006
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Andreas Falley:

jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
version="1.2"
But I don't have my linux box (where I code from) online, yet the code runs fine. Indeed, it looks like
Sun doesn't have the page online either.
[LIST]

Hi..
The attributes specified tell the parser that the document is defined using a particular namespace. Any JSP parser would automatically understand the attributes defined and would parse it accordingly. If you try to parse this file using an external parser, you are likely to encounter an error stating that schema definition not found.
These attributes are merely a way of telling the parser that already understands the document, "look.. I'm JSP document, version 1.2"
Thanks
SR
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!