Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sharing a property file

 
Pho Tek
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I gleaned a lot of information about property file construction from a previous posthere.
My question though is this:
I have two immutable objects A & B.
A is a heavyweight object which I'll
be using in my business logic. Whereas
B is a snapshot of relevant member variables
from A. B will be placed in the request scope
and subsequently used to paint a JSP page.
I want to create a property file which will
be accessible to both the JSP that uses B object
and also to A. How can I do that to minimize
number of reads ? I'm thinking that there should
another object representing the values read from
the property files and used by both.
Thanks
Pho
[ May 16, 2002: Message edited by: Pho Tek ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Usually property files are text that can be read/saved with the java.util.Properties class.
It sounds like you could store your objects as serialized objects if you can make them serializable.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic