On Wed, 13 Feb 2002, Howard Treisman wrote: > 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?
They come from a listener that initializes data when the context starts up. The listener is defined in the standard-examples application's web.xml file: <listener> <listener-class> org.apache.taglibs.standard.examples.startup.Init </listener-class> </listener> The source code to this class is located under the examples/src directory; it's compiled as part of the build process and included under WEB-INF/classes in the destination 'examples' application. > My questions/suggestions are: > 1. Question: Am I vaguely correct? Yes! Just to make sure my description was clear, from the root of the 'standard' directory, the path to the source to the 'Init' class is as follows: examples/src/org/apache/taglibs/jsptl/examples/startup/Init.java > 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.) Yeah, I agree. Unfortunately, since the early-access release doesn't specify or use a single expression language (but instead a pluggable collection of them for the purposes of experimentation), we weren't able to document a single one thoroughly. Even the special meaning associated with the '$' symbol is up to the individual languages. > 3. Suggestion: Please provide the corresponding .jar files for all the > .class files in the standard-examples.war. You mean the individual classes tied to the standard-examples application? I guess we could do that, but I wanted to make sure that they didn't get confused for generally applicable, reusable JARs. All JARs that you'd likely want to use in your own applications are made available as JARs. Did you have a specific suggestion about which classes might be more usefully packaged than we're giving them credit for? > 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. The web.xml file is described in chapter 13 ("Deployment Descriptor") of the Servlet 2.3 specification, available from java.sun.com. The <listener> tag represents a concept introduced with version 2.3 of the Servlet specification. Hope that helps, -- Shawn Bayern Author, "JSP Standard Tag Library" http://www.jstlbook.com (coming soon from Manning Publications) -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>