• Post Reply Bookmark Topic Watch Topic
  • New Topic

Scriptlet confusion  RSS feed

 
Ryan McClain
Ranch Hand
Posts: 153
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Referring to: book 'Head First Servlets & JSP, 2nd Edition', p. 303

I am confused about the scriptlet code on line 10 in the following snippet (copied straight out of the book):



Should scriptlet content between <% %> not end with a semicolon ;? Unless I am mistaken, while studying the book I remembered all scriptlet code between <% and %> has to end in ; because it's plain old Java code in the _jspService() method.
I am not sure if this is book errata.

Any thoughts?

 
Ryan McClain
Ranch Hand
Posts: 153
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, never mind.. I just noticed it's a legal while statement - it doesn't have to end in a semicolon.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!