Volker Turau wrote:
[snip]
> I thought scripts should only be the "glue" between beans. Scripts
> should be simple, i.e. JavaScript type. The fact that you can access a
> property in two ways (<%= name.getPName() %> and <jsp:getProperty
> name="name" property="pName"/>) is confusing for a non programmer.
>
One of the reasons there are two ways to do this is that there are two major usage
patterns in JSP -- those who think scriptlets are great, and those who hate them.
Both groups have legitimate interests, and both need access to the underlying
functionality.
The <jsp:getProperty> action is hardly the only case where this dual nature is
visible. There are straightforward scriptlet translations for pretty much all of
the standard JSP actions (<jsp:useBean>, <jsp:forward>, and so on). After all,
that's exactly what the JSP compiler does in current implementations -- translates
them into Java source code in a servlet. Users of either preference, though, can
use the style they like, and stick with it.
But, all of the scriptlet cases we've been talking about so far only work if the
underlying scripting language is Java. That is true by default now, but there is
lots of interest in other scripting languages as well. Standard JSP actions, as
well as custom tag libraries, should work unchanged with other scripting languages
as well, as long as those languages conform to the requirments of the JSP spec for
access to the underlying Java object model.
Craig McClanahan
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html