File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 61095
    
  66

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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: HttpSession or java beans