Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HttpSession or java beans

 
Dilip kumar
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Dilip kumar
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Download Chapter 13 of "Core Servlets and Java Server Pages"
http://pdf.coreservlets.com/
13.4 discusses covers this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic