aspose file tools*
The moose likes JSP and the fly likes scripting variables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "scripting variables" Watch "scripting variables" New topic
Author

scripting variables

newcity
Greenhorn

Joined: Aug 02, 2002
Posts: 1
What is scripting variables?
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
lsa
Welcome to the Java Ranch, we hope you�ll enjoy visiting as a regular however,
your name is not in keeping with our naming policy here at the ranch. Please change your display name to an appropriate name as shown in the policy.
Thanks again and we hope to see you around the ranch!!
Shawn Bayern
Author
Ranch Hand

Joined: May 06, 2002
Posts: 160
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,


Shawn Bayern<br />"JSTL in Action" <a href="http://www.jstlbook.com" target="_blank" rel="nofollow">http://www.jstlbook.com</a>
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
newcity
Thanks for changing your name however, you might have missed the part inthe naming rules that says use a first name, a space, and a last name.
Please change it to a follow the guidelines.
thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: scripting variables