The object named by the name must have been “introduced” to the JSP processor using either the jsp:useBean action or a custom action with an associated VariableInfo entry for this name. Note: a consequence of the previous paragraph is that objects that are stored in, say, the session by a front component are not automatically visible to jsp:set- Property and jsp:getProperty actions in that page unless a jsp:useBean action, or some other action, makes them visible.
what does the above mean ..anyone with a simple example
Where does the above text come from? I could store a bean as an attribute in PageContext and then access it using <jsp:getProperty> tag later. No <jsp:useBean> or VariableInfo involved ... It works on Tomcat 4.0 at least ...
OK, I guess Tomcat does not exactly conform to the specification. I run my above mentioned code in resin and it would not run. I think jsp:useBean does two things: 1. Put the bean instance into PageContext with ID attribute and the given scope; 2. Export the bean instance to a script variable with the name given in ID attribute. If you want to write your own useBean tag, you need to do both. The first is quite easy. You can export the script variable using <variable> element in the tag's tld.