This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am working on a project where I have to implement Model 2 architecture. One of the requirements is to have to have a flat text file that holds some inventory items. Accessing the system, an authorized user will be able to see the list of items ( in the ItemsCatalog page) and get the detailed information about each of them when selecting a specific item in that list ( the detail data will be presented in the ItemDetails page, where a user will be redirected when making a specific item selection from the list ).
So far I have a Servlet that I will use to read the text file, but my question is what to do with the items once they are read. I thought I should save them in a bean but I really don't know how to do that.
I have the bean set up, and I believe I have my servlet reading the file and setting the items to an ArrayList. Now I see you said to use request.setAttribute(), which I assume is how I store each item from the array to the bean. Again I am not sure on how I go about doing this.
I really appreciate the help,
Joined: Nov 23, 2012
Here is the code for my Servlet. I am still stuck on how to save the items to the bean