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 expression

 
Fisher Daniel
Ranch Hand
Posts: 582
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
Are there differences between <%= "Joe said %/>" %> and <%= "Joe said %\>" %>
thanks
daniel
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The one with backslash i.e. "\" won't compile !!!
You can easily verify this by creating a small programme
 
Fisher Daniel
Ranch Hand
Posts: 582
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am reading JSP 1.2 Specification...
In page 41 there are examples about legal quatations. And it say that both of those is legal...
Correct me if I am wrong...
daniel
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
.. Correct then it sud work !!
but in my tomcat on using a backslash, I am getting the error as "Invalid escape character" :roll:
 
Amer Khan
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is called an escape character=\
if u want hello%> printed
<%="hello%\>" %>
if u want <%=hello printed
<%= "<\%=hello" %>
if u want hello"Fisher printed
<%= "hello\"Fisher " %>
\',\",\>,\<
\"Dont worry, be Happy\"
cheers
amer
[ May 13, 2003: Message edited by: Amer Khan ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic