j2ee: JSP Expression Language - accessing variables [6/27] ![]() ![]() ![]() |
To access a scoped variable, just use the variable name in the
EL syntax: ${name}
The following would be equivalent:
<%= pageContext.findAttribute("name") %>
or
<jsp:useBean id="name" type="package.className" scope="..."/>
You need to makes the variable names are valid Java syntax for names. It is possible to store the name under any string, so make sure these names are valid as variable names