How to retrieve a Vector of beans without using taglib ?
posted 14 years ago
Hello, I have a "MyServlet.java", "My.jsp" and "ItemList.java" which is a bean class. First "MyServlet.java" 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: request.getAttribute("ItemListVec"); 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 ? thanks, Ian