You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ray D'Antuono <rp...@yahoo.com> on 2002/10/11 04:58:47 UTC

bean access question

i'm trying to access, within my jsp page, a bean that is a member of a list (a
subclass of java.util.Vector, to be specific) that itself is a bean in session
scope.  the index that it occupies in the list is passed in as a request
parameter.  i can't figure out how to do define the bean without writing a
scriptlet -- is there a way to do this in a clean fashion?  here is my code:

<jsp:useBean id="myList" class="com.rpd.MyVectorSubclass" scope="session"/>
<%
    int iIndex = Integer.parseInt(request.getParameter("index"));
    Object item = myList.get(iIndex);
    request.setAttribute("item", item);
%>


__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>