Hi,
What are the JSP scriplet rules for handling conditionals that are not using { braces } to
denote code blocks?
I found an example similar to the one I created below in the SCWCD Certification book.
As it turns out, the example below generates:
"Howdy, Bill: welcome to overpricedstocks.com!
Your stocks are down today."
With Tomcat, the following servlet code is generated (note the ";")
from the example:
if( displayName ) out.write("\r\n ");
Is this standard behavior for all app servers?
Thanks,
Jay
Example:
<html>
<head><title>Untitled</title></head>
<body>
<% String name = "Bill";
boolean displayName = false;
if( displayName ) %>
<b>Howdy, <%= name %></b>:
<i>welcome to overpricedstocks.com!</i>
<br>
Your stocks are down today.
</body>
</html>