Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

XML syntax for JSP expressions

 
Ranch Hand
Posts: 469
  • 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
 
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: 469
  • 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.
 
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: 469
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much.
 
On top of spaghetti all covered in cheese, there was this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic