I am working on some shopping cart. Well it is easy as you know and straightforward. Off some database table I retrieve some lines that correspond to a certain customer and then render this data in a certain format , all this is in a JSP file. My problem is that I want to make some processing on this data to add some concluded information out of it.
When I estimate the size of my shopping-cart page file, I guess it will be about 3000, 4000 or may be more.
I can divide processing into several phases, so each phase is put into a separate file, and then the shopping-cart will be a collecting of these files. What is the best way to make the communication between these files?
Should I first use a servlet that makes a part of processing, and then use another servlet for the next phase, and so on?
Should I use a java bean is a means of communication among several jsp files?
Frankly I miss OOP in JSP files if only I could use encapsulation; can anybody tell me more about getting benefit of encapsulation in JSP?
Every answer will be appreciated. Thank you for reading…