I am also using WebLogic and it is my tentative conclusion that it does NOT
meet the spec on this. I am seeing attempt to call a setXXX when no
parameter XXX appears in HTTP request parameter list.

The specifics are my situation is that I have two setters setXXX with different
signatures. At <jsp:setProperty id="bean" name="foo" property="*" /> WebLogic
reports that is can't resolve setter because of ambiguity of setXXX(null).  Again,
this is the case where XXX does not appear as parameter. That is reporting
this message at all tells me 1) it does attempt to invoke all setters and 2) for
those w/o parameters in http request, it is passing null.

This leads me to conclude WebLogic is not in compliance per Hans reporting on
section 2.13.2.1:

rob

Brian Slezak wrote:

> > Okay, let's set stage here to make sure we talk about the same thing. What
> > I responded to earlier was what the JSP spec says about calling bean access
> > methods automatically when <jsp:setProperty name="foo" property="*"> is used.
> > This is what I referred to, from section 2.13.2.1:
> >
> >   If you set propertyName to * then the tag will iterate over the current
> >   ServletRequest parameters, matching parameter names and value type(s) to
> >   property names and setter method type(s), setting each matched property to
> >   the value of the matching parameter. If a parameter has a value of "", the
> >   corresponding property is not modified.
> >
> > If you're talking about something else, such as using request.getParameter()
> > in a scriptlet to manually set a bean property value, then the rules are
> > different. If you call the bean's access method like this, the property will
> > of course be initialized to "". Same thing if you use a <jsp:setProperty>
> > action like this:
> >
> >   <jsp:setProperty name="foo" property="bar"
> >     value="<%= request.getParameter(\"bar\") %>" />
> >
> > Hans
> > --
> > Hans Bergsten           [EMAIL PROTECTED]
> > Gefion Software         http://www.gefionsoftware.com
>
>     Ok.  Well I have tried using the setProperty tag with property="*", but it
> had no effect whether left out or not.  What I'm talking about is say you have a
> form, and just hit submit without entering any information in any fields.  Take
> this example (assuming you have an accompanying Bean to go with it):
>
> <html>
> <head>
> <title> Test Page </title>
> <jsp:useBean id="bean" scope="session" class="nameBean" > </jsp:useBean>
> <body>
> <p>The property name is null = <%= ( request.getParameter("name") == null ) %>
> </p>
> <form method="get">
> <p>Name:<input type="text" name="name" size="20" value=" <jsp:getProperty
> name="bean" property="name" /> "></p>
> <p><input type="submit" value="Submit" name="submitBtn"><input type="reset"
> value="Reset" name="ResetBtn"></p>
> </form>
> </body>
> </html>
>
>     When this page is initially loaded, it will tell you that "The property name
> is null = true".  After hitting the submit button with NOTHING in the field, it
> will tell you "The property name is null = false".
>
>     Sorry about the confusion.  I really need to sit down and read the specs I
> suppose, because I'm curious of when the Bean is created and why I'm having
> trouble initializing Bean properties when it is created.  :)
>
> Thanks for you help though,
> Brian
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to