> C�dric Janssens:

> >  <jsp:setProperty name="cookies" property="request" value="<%= request
> %>"/>
>
> But this last statement is not working, the setRequest of CookieBean is not
> called, maybe because the value is not a String.
>
> My JSP engine is Jrun 2.3.3 under NT.
>
> I don't known if this syntax is JSP 1.0 - compliant?

It is, section 2.13.2 of the spec states:

   Properties in a Bean can be set from one or more parameters in the
   request object, from a String constant, or from a computed
   request-time expression.

> Larne, with wich servlet engine did you have it worked?

It works under Sun's JSWDK 1.0.

I don't know Jrun, but the early access release of the JSWDK had a bug
that prevented set methods from working if the parameter was an
interface.  If this is what is causing your problem, it can be fixed
by changing setRequest() to:


public void setRequest(Object req) {
   HttpServletRequest request = (HttpServletRequest) req;
   Cookie _cookies[]          = request.getCookies();

   for(int i=0;i<_cookies.length;i++) {
     cookies.put(_cookies[i].getName(),_cookies[i]);
  }
}


                                                  - Larne

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to