Expressions become the argument to an out.print()

image with no caption
image with no caption

In other words, the Container takes everything you type between the <%= and %> and puts it in as the argument to a statement that prints to the implicit response PrintWriter out.

When the Container sees this:

<%= Counter.getCount() %>

It turns it into this:

out.print(Counter.getCount());

If you did put a semicolon in your expression:

<%= Counter.getCount(); %>

That would be bad. It would mean this:

image with no caption

Note

NEVER end an expression with a semicolon!

<%= neverPutASemicolonInHere %>

<%= becauseThisIsAnArgumentToPrint() %>

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset