A bean is an object. The useBean element creates the bean if an object
is not found. Obviously, it cannot create a java.util.List.

Paul

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]] On Behalf Of
Nilsson, Mattias
Sent: Thursday, March 14, 2002 12:57 PM
To: [EMAIL PROTECTED]
Subject: Two JSP/JavaBean questions.


Hi,

I've encountered two problems when using the JavaBean tags in a JSP
page:

1) Why can't I use the useBean tag when the class is really a
implementation of an interface. E.g.:

<jsp:useBean id="aBean" class="java.util.List" scope="request" />

Must I write an instancable class in the class="" definition? Why? I
want to use this with the stuts logic taglibrary for iterating a list,
but do I then have to fetch the list with <% List l =
request.getAttribute("..."); %> ?


2) Why can't I write:
<tl:tag attib="<jsp:getProperty name="aBean" property="a"/>"/> when
<tl:tag attib="<%= aBean.getA() %>"/> works perfectly (the tag's attribs
are all set to rtexprvalue = true).


Thanks for your help.

Mattias

________________________________________________________________________
___
To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to