Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

diff between Jsp Document And Jsp Page

 
Vilas Lawande
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,
Please elaborate.......
What is difference between Jsp Document And Jsp Page?
 
BO KANG
Greenhorn
Posts: 9
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A JSP document is a JSP page written in XML syntax as opposed to the standard syntax JSP Page. Because it is written in XML syntax, a JSP document is also an XML document and therefore gives you all the benefits offered by the XML standard:

You can author a JSP document using one of the many XML-aware tools on the market, enabling you to ensure that your JSP document is well-formed XML.
You can validate the JSP document against a document type definition (DTD).
You can nest and scope namespaces within a JSP document.
You can use a JSP document for data interchange between web applications and as part of a compile-time XML pipeline.

In addition to these benefits, the XML syntax gives the JSP page author less complexity and more flexibility. For example, a page author can use any XML document as a JSP document. Also, elements in XML syntax can be used in JSP pages written in standard syntax, allowing a gradual transition from JSP pages to JSP documents.

E.g
Jsp page : <%=expression %>
Jsp document: <jsp:expression></jsp:expression>

Hope this will help you
 
Anand Bhatt
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In basic difference between two is :
1: A JSP document is a JSP page written in XML syntax as opposed to the standard syntax.
2: As JSP document is written in XML syntax, a JSP document is also an XML document and therefore it can take all the benefits offered by the XML standard.
3: Jsp pages are saved having file extension of .jsp , while JSP documents having .jspx extension.
4: The main difference is Standard Syntax(that JSP page use) Versus XML Syntax(that a JSP Document use).
 
Vilas Lawande
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for valuable reply.

Thanks Regards
Vilas Lawande
 
What are you doing? You are supposed to be reading this 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!