The standard-examples.war file provided with the distribution is excellent.
However, I had a lot of difficulty understanding ~where~ the value
$customers comes from in many of the examples. For example:

<c:forEach var="customer" items="$customers">

Where does that pesky $customers come from?

At first I thought the JSP might do a "new" of the customers class - but
then which package?

Then I reread the documentation on expression languages, which indicated
that $customers comes from one of request, page, session or application
contexts. But how did it get there? I searched all the prior pages to see if
one of them set the customers object, but no luck.

Drilling into the web.xml file, I finally found a reference to something
called a listener, which points to a class called "Init". However, there is
no source code for the Init class, so it's difficult to know what it does.

My (unconfirmed) suspicions so far are that:
- The Init class is called at certain lifecyle events for the war.
- It hooks a particular event, and creates and sets the customers class into
either the session or application contexts.

My questions/suggestions are:
1. Question: Am I vaguely correct?
2. Suggestion: Please provide more documentation on the basics of the
expression language, especially the $ symbol and what it means and how it
works. (There seems to be quite a bit of confusion about this elsewhere on
the mailing list.)
3. Suggestion: Please provide the corresponding .jar files for all the
.class files in the standard-examples.war.
4. Question: I have been unable to find a reference for the web.xml file,
especially the listener tag - can someone please point me at it.
5. Suggestion: It has been proposed elsewhere on this list that the syntax
{customers} might be more intuitive that $customers. FWIW, I agree
wholeheartedly.

Many thanks,
Howard


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to