Scripting elements manipulate objects and perform computations. The character sequence that precedes a scripting element depends on the element’s type: <% for a scriptlet, <%= for an expression, and <%! for a declaration. Scriptlets, expressions, and declarations are all closed with the sequence %>.
Scriptlets contain a code fragment valid in the scripting language:
<% cart.processRequest(request); %>
Expressions contain an expression valid in the page scripting language:
Value="<%= request.getParameter("amount") %>"
A declaration declares variables or methods valid in the page scripting language (usually Java, but other languages can be defined in the page directive):
<%! Connection myconnection; String mystring; %>
Copyright © 2005. Sybase Inc. All rights reserved. |