August 2002
Intermediate to advanced
688 pages
23h
English
Because certain character sequences represent start and stop tags, you sometimes need to escape a character so the container doesn’t interpret it as part of a special character sequence.
In a scripting element, if you need to use the characters
%> literally, you must escape the greater-than
character with a backslash:
<% String msg = "Literal %\> must be escaped"; %>
To avoid the character sequence <% in template
text being interpreted as the start of a scripting element, you must
escape the percent sign:
This is template text, and <\% is not a start of a scriptlet.
In an attribute value, you must use the following escapes:
attr='a value with an escaped \' single quote' attr="a value with an escaped \" double quote" attr="a value with an escaped \ backslash" attr="a value with an escaped %\> scripting end tag" attr="a value with an escaped <\% scripting start tag"
Read now
Unlock full access