• Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp and database  RSS feed

 
sudharshan tettu
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I have a requirement like:
some values are dynamically retreived from database and populated on a jsp page whenever the page is loaded..it happens whenever the request for the page is made.
but i dont want to make a call to database as the data is static,instead i want to save the values and populate it there,instead of makin call to DB everytime..
Is there any way of doing this ,other than setting to session?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the data the same for all users?
If so, you may want to consider caching it in context scope.

If it is different for each user but doesn't change over the course of a user's session then the session object would be the perfect place to cache it.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!