• Post Reply Bookmark Topic Watch Topic
  • New Topic

Where to keep values?

 
jacob deiter
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If a JSP page contain Fields like Drop list, Combo box, Option button, etc. Those should be populated with value when it display to user. Where to save those values?, in data base or some other resource?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That clearly depends upon the application. No one answer would be correct for all. But if its a DB-driven app, why would the data not be stored int he DB?
 
jacob deiter
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, consider, if I use Database for storing those values, then for every time the page getting displayed, then I have to get the values from database? If or can I store those values in JSP Application scope??
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depends how long they need to stay around and how often they'll change. Without some information and requirements around the data, it's impossible to give any advice.
 
jacob deiter
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
consider It is an intranet Application,the use will use the page for long time through out the business hours(8 hours)
 
Himanshu Kansal
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Bear said, it depends on how long they need to be around AND how frequently they change, if they are not too heavy, they can be stored in the application's scope. We clearly assume here that a lot of users would read those values by sending concurrent and independent requests. If it is one odd user using the page and does not reload the page pretty often then the DB would be a better option.

Regards
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!