I wish to use $(member.email), a variable which I’ve passed into a JSP page, inside of a <% block on that same page. Its value shows up outside of the block, but inside the block it can’t see it at all.
I have tried using request.getAttribute("member.email") but that merely spit back a null. Request.getAttribute("member.email") gives me a string, which does not have the aforementioned value outside of the block.
I am unsure how to describe this problem any better than I have.
This is how
${member.email}basically works “under the covers” (scope and null checks omitted):Please note that writing Java code in JSP files is considered a bad practice. If you intend to serve JSON, you can better write it from inside the servlet instead of a JSP file. JSP is more for HTML.