reset password
Author Message
wsakura
Posts: 64
Posted 23:58 Feb 05, 2013 |

I'm a little confused about Scope for JSTL. How do we know when to use which, such as session vs application?

cysun
Posts: 2935
Posted 00:12 Feb 06, 2013 |

Well, it depends on what you plan to use the data for. For example, a guest book is something you want to keep, and every visitor of your site should see the same guest book, so the guest book should be saved in application scope. On the other hand, each user should have their own driving test, so it makes sense to use session scope for driving test.

wsakura
Posts: 64
Posted 01:41 Feb 06, 2013 |
cysun wrote:

Well, it depends on what you plan to use the data for. For example, a guest book is something you want to keep, and every visitor of your site should see the same guest book, so the guest book should be saved in application scope. On the other hand, each user should have their own driving test, so it makes sense to use session scope for driving test.


Oh, ok. That makes sense. Thank you for the example.