reset password
Author Message
Amedrano
Posts: 80
Posted 14:24 Nov 30, 2014 |

Prior to this HW assignment we stored information (such as a list of items) in application scope.  Is there a similar way to do this using databases? or must we retrieve data from the database (and create a list of items) for every servlet that we need data passed to the JSP for?

nextmatrixman
Posts: 57
Posted 14:31 Nov 30, 2014 |

From what I understand from the class material, you can replace whatever you used to store in the application scope with database. So for the homework you should always write to and read from the database, using queries.

cysun
Posts: 2935
Posted 14:32 Nov 30, 2014 |

You must retrieve data from database for every request to ensure that the user always sees the most up-to-date information. In theory you can use caching to avoid hitting the database every time, but implementing caching that supports concurrent updates is rather complex.

Amedrano
Posts: 80
Posted 14:36 Nov 30, 2014 |

K Thanks