• Post Reply Bookmark Topic Watch Topic
  • New Topic

Application Scope Of JSP Bean : Use Case ?  RSS feed

 
Sangel Kapoor
Ranch Hand
Posts: 162
1
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Guys

I wonder what is the best use case when we will use the scope for JSP bean to be Application Scope.
Any practical scenario where you used the same would be great.

Thanks !!!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Application scope is best used for (usually read-only) information that needs to be shared across the entire application.

Example: in one project all the information for the various dropdowns was stored in DB tables. In a context listener these tables were read and the data stored as List or Map instances in application scope where they were easily accessible via JSTL from the various JSPs. This is just one small example of such a use.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!