Re: bean-cookie.jsp

2001-02-10 Thread Matthias Kerkhoff

Hello Hal,

> The jsp 1.1 spec implies that the jsp:useBean tag does not need to be used
> before using jsp:getProperty.

That's correct. The 1.1 errata and the 1.2 spec make this even more explicit.

> 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. 

 does not work, because Weblogic does not implement the spec
correctly. There are a couple of things that should be done from my point
of view:

a) Notify BEA and request a fix
  (done three months ago for WLS 5.1, unsure what's with WLS6.0)

b) Until Bea supplies a fix, fix it on your own
  (done for WLS 5.1, see my mails from yesterday)
  
c) Change the test page(s) (applies to bean-cookie; logic-match; logic-present)
  They will fail on any container, if no cookie is present. The tag should use
  the value="FOO" attribute to get a default for missing cookies.
  (supplied updated JSPs yesterday to STRUTS-DEV, see my mail titled
   "struts-test w/ URLRewriting (Patch to enable...)" )

d) Change the test page, if you don't like a) and b) to gracefully catch,
  print and explain exceptions to the user.
  I think that a test-suite should not fail completly on a known bug. Either
  the bug should be fixed, or the suite should catch the error, print and
  explain it. People new to Struts may otherwise immediatly stop looking
  further into it, because it really doesn't matter to them where the
  exception comes from.

Matthias(mailto:[EMAIL PROTECTED])





bean-cookie.jsp

2001-02-09 Thread Deadman, Hal




The struts documentation says 
this in 
.../struts-documentation/api/org/apache/struts/taglib/bean/package-summary.html
You must use  
to introduce a reference to an existing bean, if you wish to reference that bean 
with other standard JSP tags (such as  or 
). If you only wish to reference such beans 
with other Struts tags, use of  is not 
required.
The bean-cookie.jsp page in the 
struts-test application uses  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  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