Signup/Sign In

JSP Expression Tag

Expression Tag is used to print out java language expression that is put between the tags. An expression tag can hold any java language expression that can be used as an argument to the out.print() method. Syntax of Expression Tag

<%= Java Expression %>

When the Container sees this

<%= (2*5) %>

It turns it into this:


Note: Never end an expression with semicolon inside Expression Tag. Like this:

<%= (2*5); %>

Example of Expression Tag

        <title>My First JSP Page</title>
       int count = 0;
        Page Count is <%= ++count %>