• Post Reply Bookmark Topic Watch Topic
  • New Topic

Where to store setup data in glassfish web application  RSS feed

 
John Blunket
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In my web application I have some data that I want to be visible to every method, and is a constant value.

Where do I put this? as I think I am not supposed to use global static values, and I don't want the overhead of database access every time I use a method.

Regards,
John.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Study the servlet API - glassfish is the reference implementation for the latest servlet API.

Web apps frequently use Properties files for simple setup data and XML for complex data. A common convention is to place the files under WEB-INF so they will not be "visible" directly to clients.

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