I don't know why you would want to do this, but you have a few of options
(and probably more):

1.  declare the wanted resources as instance variable final Strings in each
servlet;

2.  load the resources into a separate java.util.Properties class with
groups of resources available in different returning static methods and have
the servlets call the appropriate method;

3.  put the resources in difference database tables as strings with each
key-value pair separated by some delimiter recognized by default by
java.util.Properties, and have the servlets get them via some type of data
access object which would read the records into a StringBuffer, call
toString(), load the string into a ByteArrayOutputStream that is chained to
a ByteArrayInputStream and call properties.load( inputStream).

Mark

-----Original Message-----
From: Billy Ng [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 3:15 PM
To: Struts Users Mailing List
Subject: Servlte-level Resource Files


Hi folks,

I don't know if anybody is doing this.  I want to move the resoruces to the
servlet level which means each servlet has its own resources instead of
putting the entire app's subtitutes in ApplicationResources.properties.  If
you have the mechanism like this, would you please give me some points for
how to do it.

Thanks!

Billy Ng

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to