The <%= %> tags only work to print out a string that is returned by the code betweent them.
I believe that was the intent of the poster.
And, it doesn't have to be a string; the expression within the delimiters can return any class or primitive. In the case that a class is returned, the toString() method is called on the class to determine the value to emit.