This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Servlets and the fly likes How to retrieve a Vector of beans without using taglib ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic

How to retrieve a Vector of beans without using taglib ?

Ian Yang
Ranch Hand

Joined: Nov 27, 2001
Posts: 44
I have a "", "My.jsp" and "" which is a bean class. First "" handles some business logic and then feeds a Vector of items into "ItemList" bean and creates a vector of Litemlist bean, then do
request.setAttribute("ItemListVec", v);
and forward(request, response) to "My.jsp".
Question is-- In "My.jsp", if I don't use taglib, and just want to use <jsp:useBean> <jsp:getProperty> syntax, how can I retrieve the ItemList vector ? The "id" in jsp:useBean is associated with the vector, not element, and this "id" matches to "ItemListVec". How do I get info. from each element ? what "id" should I use when I retrive element ?
I know I can do in a similar way by simply do:
then loop through it and get the info from each element. But in this way, I am NOT using <jsp:useBean> <jsp:getProperty> syntax, am I still using MVC ?
Junilu Lacar

Joined: Feb 26, 2001
Posts: 6264

Reply here:
Please do not cross-post. This thread will be closed.
Thanks for your cooperation.
Don't get me started about those stupid light bulbs.
subject: How to retrieve a Vector of beans without using taglib ?
jQuery in Action, 3rd edition