| Author |
Where to keep values?
|
jacob deiter
Ranch Hand
Joined: Apr 02, 2008
Posts: 576
|
|
|
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
Joined: Jan 10, 2002
Posts: 56185
|
|
|
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?
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
jacob deiter
Ranch Hand
Joined: Apr 02, 2008
Posts: 576
|
|
|
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
Joined: Jan 10, 2002
Posts: 56185
|
|
|
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
Joined: Apr 02, 2008
Posts: 576
|
|
|
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
Joined: Jul 05, 2009
Posts: 257
|
|
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
|
Experience and talent are independent of age
|
 |
 |
|
|
subject: Where to keep values?
|
|
|