Hi guys. I have a question about using request.setAttribute and request.getAttribute.
Say for example I have an online book store with different categories (drama,sci-fi,etc).
If the user clicks on a particular category, the
servlet will fetch all the records that match the category_name, will create a bean with all the book properties and put this bean in a vector.
In other words, a vector full of beans. the vector will be placed in the request in this way:
request.setAttribute("list",vectorResults)
Now, a list with all the books under that category will be displayed to the user, with a link to a specific book, example:
Now, displayProduct.jsp shows in detail all the book details. It should be pretty straightforward because I have all the information in my vector, which is full of beans. But the problem is when I try to access my vector in displayProduct.jsp I get that the vector is Null. Why? is it because I put it in the request? I should be able to look in the vector for the itemId and display it in the
jsp page, no need to involve database again.
what is wrong???
thanks