Originally posted by lsa:
What is scripting variables?
In a
JSP page, scripting variables are variables you can use in the page's scripting language, which is typically Java. For instance, in
<%= foo.getBar() %>
'foo' is a scripting variable. You can declare scripting variables using the <jsp:useBean> tag or, in Java, manually within a scriptlet:
<% Customer foo = getCustomer(); %>
Also, custom tags in JSP can declare scripting variables.
Scripting variables, and the very notion of in-page scripting with Java, are rapidly becoming obsolete; many page authors have abandoned them in favor of custom tags entirely. JSTL (JSP Standard Tag Library) tags, in fact, don't even declare scripting variables. Instead, they use an expression language for accessing variables in your pages. So you get to write
${customer.name}
instead of
((Customer) pageContext.findAttribute("name")).getName()
You can find out more about JSTL at
http://java.sun.com/products/jstl Hope that helps,