John Paul Hoey wrote:I decided to go with session scope however can I ask what is the preferred way to store data between JSP and Servlets?
It depends. Session scope should only be used for longer-term storage. Communications between a page controller and its JSP usually employs request scope. Your reliance on session scope may be an indication of a fundamental design problem.
Is it to use JavaBeans or to use Session scope? Is there a benefit to one over the other?
"or"? It's not an either or. You can store any objects you want in the various scopes. Whether the objects are beans or not is irrelevant. In fact, most of the time, they will be.
Your question is like asking "Which should I use: an egg crate, or eggs?" The session scope (and other scopes) are containers, beans are just one of the things you can put into the containers.
I'm getting a feeling that there's a fundamental misunderstanding going on here, but I don't have enough info to pin it down. Statements like the above are a clear red flag though.