If You still want to use scriptlet (which is not recommended in JSP) with Your example and in fact the intention was to append a string to an existing value (not building variable on the fly -like JavaScript eval-) then an answer could be: