SCJP6, SCWCD5, OCE:EJBD6.
BLOG: http://leakfromjavaheap.blogspot.com
SCJP6, SCWCD5, OCE:EJBD6.
BLOG: http://leakfromjavaheap.blogspot.com
SCJP6, SCWCD5, OCE:EJBD6.
BLOG: http://leakfromjavaheap.blogspot.com
[My Blog]
All roads lead to JavaRanch
SCJP6, SCWCD5, OCE:EJBD6.
BLOG: http://leakfromjavaheap.blogspot.com
So why do those actions need <jsp:useBean>? pageContext.findAttribute(...) finds a bean without <jsp:useBean>.
How can <jsp:useBean> makes a bean visible for <jsp:set/getProperty>?
SCJP5.0, SCWCD5.0, OCEJPAD6, OCPJWSD6
SCJP6, SCWCD5, OCE:EJBD6.
BLOG: http://leakfromjavaheap.blogspot.com
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. If the object was not introduced in this manner, the container implementation is recommended (but not required) to raise a translation error, since the page implementation is in violation of the specification.
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.
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
SCJP6, SCWCD5, OCE:EJBD6.
BLOG: http://leakfromjavaheap.blogspot.com
SCJP5.0, SCWCD5.0, OCEJPAD6, OCPJWSD6
SCJP6, SCWCD5, OCE:EJBD6.
BLOG: http://leakfromjavaheap.blogspot.com
If the object was not introduced in this manner, the container implementation is recommended (but not required) to raise a translation error, since the page implementation is in violation of the specification.
SCJP5.0, SCWCD5.0, OCEJPAD6, OCPJWSD6
Chinmaya Chowdary wrote:Hi, Lucas.
The JSP specification says,If the object was not introduced in this manner, the container implementation is recommended (but not required) to raise a translation error, since the page implementation is in violation of the specification.
I think it depends on container implementation. It seems that 'Tomcat 5.5.28' will not implement this.
Incase of <variable>, see this. And for 'variable' directive in tag files, see this.
SCJP 5.0 SCWCD 5.0