The struts documentation says this in .../struts-documentation/api/org/apache/struts/taglib/bean/package-summary.html
You must use <jsp:useBean>
to introduce a reference to an existing bean, if you wish to reference that bean
with other standard JSP tags (such as <jsp:getProperty>
or
<jsp:setProperty>
). If you only wish to reference such beans
with other Struts tags, use of <jsp:useBean>
is not
required.
The bean-cookie.jsp page in the struts-test application uses <jsp:getProperty> but does not first use jsp:useBean. This makes Weblogic 6.0 very angry and it fails to generated any java code let alone compile the jsp.
The jsp 1.1 spec implies that the jsp:useBean tag does not need to be used before using jsp:getProperty.
From page 66 of the spec:
An <jsp:getProperty> action places the value of a Bean instance property, converted to a String, into the implicit out object, from which you can display the value as output. The Bean instance must be defined as indicated in the name
attribute before this point in the page (usually via a useBean action).----------------end of spec
Either the struts documentation should be changed to be less emphatic about the use of jsp:useBean or the bean-cookie.jsp should be changed to be nice to Weblogic. It could use bean:write only and not use jsp:getProperty. I have always assumed the bean:cookie tag didn't work in Weblogic 6.0 because the bean:cookie test page didn't work. Maybe there should be a separate test page to assess the ability of a jsp engine to use jsp:getProperty for beans defined by means other than jsp:useBean. That seems like something the J2EE certification suite should test for rather than struts.
Thanks, Hal