Difference between <%= foo %> and ${ foo }
问题 Coding in JSP for the first time, I need to render a variable's value to HTML. It looks like there are various ways to do this; what is the difference between these (given that I have a variable named foo )? <%= foo %> and ${ foo } 回答1: This, using an old fashioned output scriptlet which is discouraged since a decade, <%= foo %> does basically the same as the following in a regular scriptlet : <% out.println(foo); %> which in turn does basically the same as the following in a normal Java