Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

XML syntax for JSP expressions  RSS feed

 
Veena Pointi
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While reading core servlets and javaserver pages by marty hall ,I didn't understand the following lines.
<b>XML authors can use the following alternative syntax for JSP expressions :
<jsp:expression>Java Expression</jsp:expression>
In JSP1.2 and later ,servers are required to support this syntax as long as authors don't mix the xml version and the standard JSP version(<%=.....%> in the same page.</b>
What do the above lines imply?Does it mean that when we use XML version of jsp:expression in a JSP page,we can't use JSP version of JSP expressions at all?
Thanks
Veena
 
Ashish Pagare
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, we are not suppose to mix the syntax.
What ever you can do with orignal jsp syntax, you can also do with the xml jsp syntax.
XML is a well formed by nature and thus jsp page written in xml syntax is neat compared to original jsp syntax.
 
Veena Pointi
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.Is it common to use xml version in jsp page in real applications?
Veena
 
Ashish Pagare
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can't answer that however all the application servers in market do support xml syntax for writing jsp.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have needed this XML syntax a few times, mainly where XML/XSLT styling is used to add common "look and feel" to JSPs. The same would be true if any sort of XML processing is needed.
 
Veena Pointi
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!