• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

storing data from database

 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
I'm using a JSP page to call a servlet which accesses a database and retrieves some data.
on my JSP pages, I want to show 5 sets of data on each page, where users can see the next set of data by clicking a button or a link to the net page.
my question is that when I connect to database, and get all of the data, can I store the data somewhere as an object so that for the next set of data on another page, I don't have to open the database connection again?
Would sessions in this case solve the problem?
answers would be appreciated.
 
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could store it in a session attribute.
 
reply
    Bookmark Topic Watch Topic
  • New Topic