Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes HttpSession or java beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "HttpSession or java beans" Watch "HttpSession or java beans" New topic
Author

HttpSession or java beans

Dilip kumar
Ranch Hand

Joined: Oct 16, 2000
Posts: 360
Hi All -

I'm developing a simple web application using JSPs and Servlets. I need to store and retrieve parameters selected (such as Category, Date etc) by user. I'm not sure which one is better: HttpSession or java beans. I would appreciate any guidance.

Thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60764
    
  65

It's not an either/or choice. You create the Java beans containing your data and store them in one of the scope contexts -- one of which can be session scope.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Dilip kumar
Ranch Hand

Joined: Oct 16, 2000
Posts: 360
Bear, Thanks for the response.

Are there any good books which explains using sessions in JSPs and Servlets ?

Thanks
[ January 17, 2006: Message edited by: Dilip kumar ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Download Chapter 13 of "Core Servlets and Java Server Pages"
http://pdf.coreservlets.com/
13.4 discusses covers this.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
wood burning stoves
 
subject: HttpSession or java beans
 
Similar Threads
Session in EJB
Stateful entity beans in design
HttpSession Vs Stateful session beans
DWR and Spring Scoped Beans
Question about Distrubatble Web Application